Repository navigation
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)Accessibility, e.g. VoiceOver or TalkBack. (aka a11y)f: focusFocus traversal, gaining or losing focusFocus traversal, gaining or losing focusfound in release: 3.27Found to occur in 3.27Found to occur in 3.27found in release: 3.28Found to occur in 3.28Found to occur in 3.28has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team
Description
Steps to reproduce
Reload html with any embedded flutter app on Samsung device (I used tablet and S21FE phone).
Tap on menu-like list items on top.
Expected results
I would like to be able to click on the list of menus, but for 5 to 30 seconds, there is no reaction to tapping on them. Them, either after that time by itself, or it seems faster when I do something on the flutter app (like clicking on the counter button in the famous app), I can bring the HTML to life fast. But it always hangs initially. 100% reproducible after every reload of the html page on my two Samsung devices. Does not happen on my Firefox or Chrome browser on my Linux desktop.
Actual results
I expect the menu to react (visually) on tapping.
Code sample
<!DOCTYPE html>
<head>
<base href="/" />
<meta charset="UTF-8" />
<meta content="IE=Edge" http-equiv="X-UA-Compatible" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Blah" />
<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="apple-mobile-web-app-title" content="Blah" />
<link rel="apple-touch-icon" href="icons/castle.png" />
<!-- Favicon -->
<link rel="icon" type="image/png" href="icons/castle.png" />
<title>Intro Muros</title>
<link rel="manifest" href="manifest.json" />
<link rel="stylesheet" href="css/stylebug.css">
</head>
<body>
<section class="topmenu" >
</style>
<ul>
<li><a id="menu_frankfurt" href="#frankfurt">Frankfurt</a></li>
<li><a id="menu_ulm" href="#ulm">Ulm</a></li>
<li><a id="menu_erfurt" href="#erfurt">Erfurt</a></li>
<li><a id="menu_bremen" href="#bremen">Bremen</a></li>
<li><a id="menu_osnabrueck" href="#osnabrueck">Osnabrück</a></li>
</ul>
</section>
<div class="grid">
<section class="contents">
<article>
<div id="flutter_target"></div>
</article>
</section>
<section class="blahblah">
<H2>Intra Muros</H2>
</section>
</div>
<script>
{{flutter_js}}
{{flutter_build_config}}
const target = document.getElementById('flutter_target');
_flutter.loader.load({
onEntrypointLoaded: async function (engineInitializer) {
const appRunner = await engineInitializer.initializeEngine({
hostElement: target,
});
await appRunner.runApp();
}
});
</script>
</body>
</html>CSS here
* {
box-sizing: border-box;
}
#flutter_target {
height: 40vh;
}Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
[Paste your output here]Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: accessibilityAccessibility, e.g. VoiceOver or TalkBack. (aka a11y)Accessibility, e.g. VoiceOver or TalkBack. (aka a11y)f: focusFocus traversal, gaining or losing focusFocus traversal, gaining or losing focusfound in release: 3.27Found to occur in 3.27Found to occur in 3.27found in release: 3.28Found to occur in 3.28Found to occur in 3.28has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyWeb applications specificallyteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team
Activity
huycozy commentedon Aug 5, 2024
Your sample code is incomplete so I tried with the one below but couldn't see the issue on my device
Galaxy Tab A7 Lite (Android 14), Chrome browser.Sample code (index.html)
Replace
index.htmlon a newly created Flutter project:Please also try this sample code on your end and confirm whether it happens.
Please be more specific on this. Can you provide a recorded video of the bug?
Please provide output of
flutter doctor -vas well. Thanks!RobertRoeb commentedon Aug 5, 2024
flutter doctor -v
[✓] Flutter (Channel stable, 3.22.1, on Ubuntu 24.04 LTS 6.8.0-39-generic, locale de_DE.UTF-8)
• Flutter version 3.22.1 on channel stable at /home/robert/snap/flutter/common/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision a14f74f (vor 3 Monaten), 2024-05-22 11:08:21 -0500
• Engine revision 55eae6864b
• Dart version 3.4.1
• DevTools version 2.34.3
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /home/robert/Android/Sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /home/robert/AndroidStudio/jbr/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[✓] Linux toolchain - develop for Linux desktop
• clang version 10.0.0-4ubuntu1
• cmake version 3.16.3
• ninja version 1.10.0
• pkg-config version 0.29.1
[✓] Android Studio (version 2023.1)
• Android Studio at /home/robert/AndroidStudio
• Flutter plugin version 77.2.1
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
[✓] VS Code (version 1.92.0)
• VS Code at /snap/code/current/usr/share/code
• Flutter extension can be installed from:
🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (2 available)
• Linux (desktop) • linux • linux-x64 • Ubuntu 24.04 LTS 6.8.0-39-generic
• Chrome (web) • chrome • web-javascript • Google Chrome 125.0.6422.112
[✓] Network resources
• All expected network resources are available.
• No issues found!
RobertRoeb commentedon Aug 5, 2024
You didn't embed the html element, but the whole window. Change "hostElement: target" to "hostElement: flutter_target" and you'll see a mini list. I have put this app temporarily on my site
http://intra-muros.net
for you to see. I also filmed the bug and will try to upload.
RobertRoeb commentedon Aug 5, 2024
20240805_185206.mp4
Reload app from http://intra-muros.net on Samsung tablet, on tapping on the links, nothing will happen. Play with the flutter app, like clicking on floating button, and the list will come to life. In my real app, it can hang for 30s and seems completely broken.
RobertRoeb commentedon Aug 5, 2024
20240805_185635.mp4
This is the right behaviour with visual feedback that will appear after 5s to 30s if you play with the flutter app. I just checked, the hang also appears on a more recent Samsung S21 FE with Android 14 and OneUI 6.1 and on iPhone 13 with iOS 17.6.
huycozy commentedon Aug 6, 2024
I used your provided sample code above so I think it's correct.
And it seems this issue happens on other mobile's browsers as well since I see it on Android Chrome and iOS Safari browsers. The steps are:
index.htmlfile as above. The issue happens on bothhtmlandcanvaskitrenderers.The issue doesn't happen on Desktop Web (tested on macOS Chrome browser) so I think this could be a focus issue on mobile browsers only.
Reproduced this on the latest Flutter stable and master channels. I will update the issue title to reflect our tests.
flutter doctor -v (stable and master)
[✓] Flutter (Channel stable, 3.22.3, on macOS 14.6 23G80 darwin-x64, locale en-VN) • Flutter version 3.22.3 on channel stable at /Users/huynq/Documents/GitHub/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision b0850beeb2 (2 weeks ago), 2024-07-16 21:43:41 -0700 • Engine revision 235db911ba • Dart version 3.4.4 • DevTools version 2.34.3 [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/huynq/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • ANDROID_HOME = /Users/huynq/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.4) • Xcode at /Applications/Xcode15.4.app/Contents/Developer • Build 15F31d • CocoaPods version 1.15.2 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2023.3) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • android-studio-dir = /Applications/Android Studio.app/ • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160) [✓] VS Code (version 1.91.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.92.0 [✓] Connected device (2 available) • macOS (desktop) • macos • darwin-x64 • macOS 14.6 23G80 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 127.0.6533.74 [✓] Network resources • All expected network resources are available. • No issues found![-]HTML page hangs for many seconds if it includes any embedded flutter app (on 2 different Samsung devices, not on desktop)[/-][+][Web][Mobile browsers] HTML link is not clickable until interacting with the embedded Flutter app[/+]25 remaining items
RobertRoeb commentedon Feb 7, 2025
Hi all, as others have reported in identical reports, this is seems to be caused by Flutter inserting semantics for web readers (I think) and I can fix the problem for me by removing these semantics placeholders. That is obviously not a good solution.
document.querySelector("flt-semantics-placeholder")?.remove();
yjbanov commentedon Jul 21, 2026
The real fix for this, until we have some usable semantics-on-by-default, is to place a placeholder on top of each
<flutter-view>instead of a singleton that stretches the whole page, covering all of the HTML content.[web] Scope the mobile semantics placeholder to its view (flutter#190856
github-actions commentedon Oct 5, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.