profile
viewpoint

Ask questions[Web] When drawer is opened and on top of some area of iFrame. Drawer item is unable to click

Steps to Reproduce

<details> <summary>full code to reproduce</summary>

import 'package:flutter/material.dart';
import 'dart:ui' as ui;
import 'dart:html' as html;

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
	return MaterialApp(
	  title: 'Flutter Demo',
	  home: MyHomePage(),
	);
  }
}

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
	return Scaffold(
	  appBar: AppBar(title: Text("test")),
	  drawer: Drawer(       
		child: ListView(
		  padding: EdgeInsets.zero,
		  children: <Widget>[
			DrawerHeader(
			  child: Text('Drawer Header'),
			  decoration: BoxDecoration(
				color: Colors.blue,
			  ),
			),
			ListTile(
			  title: Text('Item 1'),
			  onTap: () {
				Navigator.push(
				  context,
				  MaterialPageRoute(builder: (context) => SecondRoute()),
				);
			  },
			),
			ListTile(
			  title: Text('Item 2'),
			  onTap: () {
				// Update the state of the app.
				// ...
			  },
			),
		  ],
		),
	  ),
	  body: Center(child: Iframe()),
	  floatingActionButton: FloatingActionButton(
		onPressed: () {},
		tooltip: 'Increment',
		child: Icon(Icons.add),
	  ),
	);
  }
}

class Iframe extends StatelessWidget {
  Iframe() {
	ui.platformViewRegistry.registerViewFactory('iframe', (int viewId) {
	  var iframe = html.IFrameElement();
	  iframe.src = 'https://flutter.dev';
	  return iframe;
	});
  }
  @override
  Widget build(BuildContext context) {
	return Container(
		width: MediaQuery.of(context).size.width,
		height: MediaQuery.of(context).size.height,
		child: HtmlElementView(viewType: 'iframe'));
  }
}

class SecondRoute extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
	return Scaffold(
		appBar: AppBar(
		  title: Text("route test"),
		),
		body: Text("SecondRoute"));
  }
}

</details>

Expected results: <!-- what did you want to see? -->

Drawer item can accept tap

Actual results: <!-- what did you see? -->

Drawer item can not accept tap event when drawer is opened and on top of some area of iFrame

<details> <summary>flutter doctor -v</summary>

[√] Flutter (Channel master, 1.22.0-10.0.pre.87, on Microsoft Windows [Version 10.0.17763.737], locale zh-TW)
	• Flutter version 1.22.0-10.0.pre.87 at C:\flutter
	• Framework revision 4732a214a7 (2 days ago), 2020-09-04 21:05:02 -0400
	• Engine revision ac8b9c4c52
	• Dart version 2.10.0 (build 2.10.0-86.0.dev)


[√] Android toolchain - develop for Android devices (Android SDK version 29.0.0-rc1)
	• Android SDK at C:\Users\00016986\AppData\Local\Android\sdk
	• Platform android-30, build-tools 29.0.0-rc1
	• ANDROID_HOME = C:\Users\00016986\AppData\Local\Android\sdk
	• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
	• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
	• All Android licenses accepted.

[√] Chrome - develop for the web
	• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 3.6)
	• Android Studio at C:\Program Files\Android\Android Studio
	• Flutter plugin version 49.0.1
	• Dart plugin version 192.8052
	• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] IntelliJ IDEA Community Edition (version 2018.3)
	• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.2.6
	• Flutter plugin version 31.3.4
	• Dart plugin version 183.4886.3

[√] VS Code, 64-bit edition (version 1.48.0)
	• VS Code at C:\Program Files\Microsoft VS Code
	• Flutter extension version 2.25.1

[√] Connected device (3 available)
	• AOSP on IA Emulator (mobile) • emulator-5554 • android-x86    • Android 9 (API 28) (emulator)
	• Web Server (web)             • web-server    • web-javascript • Flutter Tools
	• Chrome (web)                 • chrome        • web-javascript • Google Chrome 85.0.4183.83

• No issues found!

</details>

<details> <summary>flutter run -d chrome -v</summary>

[ +164 ms] executing: [C:\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +140 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +1 ms] 4732a214a7362a3781989977429f14202143b4f5
[   +1 ms] executing: [C:\flutter/] git tag --points-at HEAD
[ +122 ms] Exit code 0 from: git tag --points-at HEAD
[   +2 ms] executing: [C:\flutter/] git describe --match *.*.* --first-parent --long --tags
[ +159 ms] Exit code 0 from: git describe --match *.*.* --first-parent --long --tags
[        ] 1.22.0-9.0.pre-87-g4732a214a7
[  +12 ms] executing: [C:\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +77 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/master
[        ] executing: [C:\flutter/] git ls-remote --get-url origin
[  +72 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[ +129 ms] executing: [C:\flutter/] git rev-parse --abbrev-ref HEAD
[  +76 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] master
[  +89 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +5 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +31 ms] executing: C:\Users\userName\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[ +150 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +5 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +80 ms] executing: C:\Users\userName\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[ +218 ms] Generating C:\Users\userName\source\flutter\so_github_issue\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[ +144 ms] List of devices attached
					emulator-5554          device product:sdk_gphone_x86_arm model:AOSP_on_IA_Emulator device:generic_x86_arm transport_id:3
[  +75 ms] Launching lib\main.dart on Chrome in debug mode...
[  +26 ms] List of devices attached
		   emulator-5554          device product:sdk_gphone_x86_arm model:AOSP_on_IA_Emulator device:generic_x86_arm transport_id:3
[  +73 ms] Updating assets
[ +130 ms] Syncing files to device Chrome...
[  +70 ms] Generating C:\Users\userName\source\flutter\so_github_issue\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[  +67 ms] <- reset
[   +9 ms] C:\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root
C:\flutter\bin\cache\flutter_web_sdk/ --incremental --target=dartdevc --debugger-module-names --experimental-emit-debug-metadata -Ddart.developer.causal_async_stacks=true
--output-dill C:\Users\userName\AppData\Local\Temp\flutter_tools.e2385774\flutter_tool.c8b67fd6\app.dill --libraries-spec
file:///C:/flutter/bin/cache/flutter_web_sdk/libraries.json --packages .packages -Ddart.vm.profile=false -Ddart.vm.product=false
--bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-call-instructions --enable-asserts
--track-widget-creation --filesystem-root C:\Users\userName\AppData\Local\Temp\flutter_tools.e2385774\flutter_tools.723bbe31 --filesystem-scheme org-dartlang-app
--initialize-from-dill build\cache.dill.track.dill --platform file:///C:/flutter/bin/cache/flutter_web_sdk/kernel/flutter_ddc_sdk.dill
[ +491 ms] <- compile org-dartlang-app:/web_entrypoint.dart
[+20118 ms] Syncing files to device Chrome... (completed in 20,743ms, longer than expected)
[   +1 ms] Synced 26.9MB.
[        ] <- accept
[        ] Caching compiled dill
[ +570 ms] [CHROME]:
[   +2 ms] [CHROME]:DevTools listening on ws://127.0.0.1:23730/devtools/browser/6dbc3dc4-9cc8-4aa9-a363-806668223ecd
[+5968 ms] Debug service listening on ws://127.0.0.1:23760/pes6XQlIJs4=

[ +322 ms] Debug service listening on ws://127.0.0.1:23760/pes6XQlIJs4=
[   +3 ms] Warning: Flutter's support for web development is not stable yet and hasn't
[        ] been thoroughly tested in production environments.
[        ] For more information see https://flutter.dev/web
[   +1 ms]   To hot restart changes while running, press "r" or "R".
[   +2 ms] For a more detailed help message, press "h". To quit, press "q".
[+8697 ms] Stopped debug service on ws://127.0.0.1:23760

[ +101 ms] Application finished.
[   +4 ms] "flutter run" took 37,415ms.
[  +69 ms] ensureAnalyticsSent: 64ms
[   +1 ms] Running shutdown hooks
[        ] Shutdown hook priority 4
[ +576 ms] Shutdown hooks complete
[   +1 ms] exiting with code 0

</details>

flutter/flutter

Answer questions yjbanov

This is a duplicate of https://github.com/flutter/flutter/issues/54027

useful!
source:https://uonfu.com/
Github User Rank List