Repository navigation
Closed
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listcustomer: junecustomer: web10e: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for WebCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webe: web_htmlHTML rendering backend for WebHTML rendering backend for Webengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 1.18Occurs in 1.18Occurs in 1.18found in release: 1.22Found to occur in 1.22Found to occur in 1.22frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has 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 specifically
Description
Steps to Reproduce
// ignore: avoid_web_libraries_in_flutter
import 'dart:html';
import 'dart:ui' as ui;
import 'package:flutter/material.dart';
void main() {
// ignore:undefined_prefixed_name
ui.platformViewRegistry.registerViewFactory('someViewType', (int viewId) {
final wrapper = DivElement();
final div = IFrameElement()
..width = '640'
..height = '360'
..src = 'https://www.youtube.com/embed/IyFZznAk69U'
..style.border = 'none';
wrapper.append(div);
return wrapper;
});
runApp(MaterialApp(home: HomeScreen()));
}
class HomeScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
drawer: Drawer(child: Container(color:Colors.yellow, child: RaisedButton(
onPressed:()=>debugPrint("123123")
))),
body: SizedBox(
width: 640,
height: 360,
child: HtmlWidget(),
),
floatingActionButton: Builder(builder: (context) {
return FloatingActionButton(
child: Icon(Icons.menu, color: Colors.white),
onPressed: () {
Scaffold.of(context).openDrawer();
},
);
}),
);
}
}
class HtmlWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return HtmlElementView(viewType: 'someViewType');
}
}
class HtmlHelloWorldWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return HtmlElementView(viewType: 'hello-world-html');
}
}flutter doctor -v
[✓] Flutter (Channel dev, v1.16.4-pre.50, on Mac OS X 10.15.4 19E266, locale
zh-Hans-US)
• Flutter version 1.16.4-pre.50 at /Users/angus/flutter
• Framework revision d14a301e41 (4 days ago), 2020-03-31 19:14:22 -0400
• Engine revision fc5b44c901
• Dart version 2.8.0 (build 2.8.0-dev.18.0 e8c4aed700)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/angus/Library/Android/sdk
• Platform android-29, build-tools 29.0.2
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_212-release-1586-b4-5784211)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.4, Build version 11E146
• CocoaPods version 1.9.0.beta.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 3.6)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 44.0.2
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build
1.8.0_212-release-1586-b4-5784211)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.3.2)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin version 43.0.3
• Dart plugin version 193.6015.53
[✓] VS Code (version 1.43.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.9.0
[✓] Connected device (3 available)
• macOS • macOS • darwin-x64 • Mac OS X 10.15.4 19E266
• Chrome • chrome • web-javascript • Google Chrome 80.0.3987.149
• Web Server • web-server • web-javascript • Flutter Tools
• No issues found!
Reacted by Sammius, Daniel Wolf, Pepe, Andreas Brauneis, Carlos Hwa, chunhunghan, Gonçalo Palma, Abhilash Chandran, David Jandrey, Oliver Welther and 5 more
Reacted by Pepe and Hamed
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work listcustomer: junecustomer: web10e: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for WebCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webe: web_htmlHTML rendering backend for WebHTML rendering backend for Webengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 1.18Occurs in 1.18Occurs in 1.18found in release: 1.22Found to occur in 1.22Found to occur in 1.22frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has 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 specifically

Activity
jing-pei commentedon Apr 5, 2020
I need help badly
jing-pei commentedon Apr 5, 2020
The only solution
iapicca commentedon Apr 6, 2020
Hi @AngusPei
I tested with the current latest master the code from your last post
screenshot
logs where clean building, but got some exception running
Thank you
jing-pei commentedon Apr 6, 2020
@iapicca

There is no problem with the current version
jing-pei commentedon Apr 9, 2020
@iapicca 1.18.0-pre.04 DIV Click invalid
yjbanov commentedon Apr 9, 2020
/cc @hterkelsen
skypu3 commentedon Apr 14, 2020
I also had similar issue on beta Flutter version 1.17.0, and also happened on newest master channel.
The icon button can't fire any event on Stack widget with HtmlElementView
38 remaining items
ditman commentedon Dec 10, 2020
We've just discovered a bug in the flutter web engine that will make the "clickable" property obsolete; I'll remove it from the codebase soon.
ditman commentedon Dec 14, 2020
A fix for the issue mentioned above has rolled to flutter master, so I have removed the "clickable" property from the widget.
The framework should be smart enough to handle the mouse cursor properly. Remember that you can set the cursor property on your HtmlElementViews manually, if needed, like so:
ditman commentedon Dec 15, 2020
ditman commentedon Dec 17, 2020
This is now a package: https://pub.dev/packages/pointer_interceptor
Thanks everybody for the feedback, I'm closing this issue.
DannyJoinedApps commentedon Jan 11, 2021
@ditman Do you currently own a house? Can I buy you a house? Maybe a private jet? This is the best package any one has ever made for any language in any universe. Its more helpful to the world than the corona virus vaccine, it sings better than pavarotti, Darwin's book's contained less useful info and it's influence will make einstein look like an idiot.
Seriously. It works and the bug has been making me look useless and this works, and it works, and the bug was terrible and this fixes it, and it works.
ditman commentedon Jan 11, 2021
LOL thanks @DannyJoinedApps, you made my day :P
sivaram16 commentedon Mar 11, 2021
@ditman Hi, first of all thanks for that wonderful package, I am facing some issue, I have 3 HTMLElement view in a screen, and above having DropDownButton the first issue if i wrap PointerInterceptor with dropdown its not working, and then i wrapped PointerInterceptor with child of the DropDownMenuItem there it works as excepted, so the second issue is if i have enabled only one html view its working smoothly if i have enabled all the three views, then i open the dropdown, the page got blinking continuously any idea about this ?
ditman commentedon Mar 11, 2021
@ThalapathySiva thanks for the kind words!
It is hard to diagnose an issue just with a few descriptions of a sentence, but it might be related to this:
#71888
Can you confirm it looks similar (and follow #71888) for updates?
sivaram16 commentedon Mar 12, 2021
@ditman Thanks for reply, I think its kinda related to that, here i will attach mine.
I have three HtmlElementView on single screen and I have added Pointer Interceptor for dropdownItem text so its just behaving like this even though i didn't hover my mouse. And in my console i am keep on getting "Flutter: restoring WebGL context".
ditman commentedon Mar 12, 2021
@ThalapathySiva a quick workaround may be to attempt to build/run your app with
--web-renderer htmlcommand-line option? It may flicker less.The flickering that people usually report in flutter web is that HtmlElementViews "reload" (if they contain an iframe, or a text editor, or a video player or similar), not the surrounding flutter UI.
The flickering that you're seeing here, however, looks like a new bug. If you can provide a small example app that displays the problems that you're seeing, we'd appreciate a new bug report for the platform-web canvaskit renderer. You can start reporting a new issue here!
Thanks for reaching out!
sivaram16 commentedon Mar 16, 2021
@ditman Sure, can you have any idea about this issue #78294.Thank you
github-actions commentedon Aug 4, 2021
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.