-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work liste: OS-version specificAffects only some versions of the relevant operating systemAffects only some versions of the relevant operating systemp: webviewThe WebView pluginThe WebView pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specificallyteam-iosOwned by iOS platform teamOwned by iOS platform teamtriaged-iosTriaged by iOS platform teamTriaged by iOS platform team
Description
Steps to reproduce
- Create a scroll view
- Put a
WebViewWidget
inside scroll view - Wrap the
WebViewWidget
withIgnorePointer
andGestureDetector
widget
SingleChildScrollView(
child: Column(
children: <Widget>[
/// other widgets,
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
// show a snack
},
child: IgnorePointer(
child: WebViewWidget(controller: controller),
),
),
/// other widgets,
],
),
)
- Run the app on iOS 18 & iOS 26 Simulator
- Drag inside the web view
(using webview_flutter 4.13.0)
Expected results
A static web view should display a preview of the website.
It should not allow scrolling or tapping.
(We were trying to show the website as a static preview. Upon tapping the preview web view, a full-screen, fully-interactive web view will be displayed)
Actual results
In iOS 18, it work as expected.
- static preview
- clicking the item inside webview would trigger
GestureDetector.onTap
instead of trigger web page click
In iOS 26,
- the web view is scrollable and clickable
Code sample
Code sample
Scaffold(
appBar: AppBar(backgroundColor: Theme.of(context).colorScheme.inversePrimary, title: Text("Demo")),
body: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Container(height: 500),
const Text('Below is web view'),
Container(
color: Colors.green,
height: 400,
padding: EdgeInsets.all(8.0),
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text('WebView tapped!')));
},
child: IgnorePointer(child: WebViewWidget(controller: controller)),
),
),
const Text('Above is web view'),
Container(height: 500),
],
),
),
);
Screenshots or Video
Screenshots / Video demonstration
The left simulator is using iOS 18 and works as expected.
The right simulator is using iOS 26 and behaves differently.
Logs
Logs
[Paste your logs here]
Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel [user-branch], 3.29.3, on macOS 15.5 24F74 darwin-arm64, locale en-GB)
! Flutter version 3.29.3 on channel [user-branch] at /Users/felixkwok/Documents/flutter_sdk/flutter
Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/setup.
! Upstream repository unknown source is not a standard remote.
Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 26.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.3)
[✓] VS Code (version 1.101.2)
[✓] Connected device (7 available)
[✓] Network resources
! Doctor found issues in 1 category.
dependencies
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.8
webview_flutter: ^4.13.0
orestesgaolin
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work liste: OS-version specificAffects only some versions of the relevant operating systemAffects only some versions of the relevant operating systemp: webviewThe WebView pluginThe WebView pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-iosiOS applications specificallyiOS applications specificallyteam-iosOwned by iOS platform teamOwned by iOS platform teamtriaged-iosTriaged by iOS platform teamTriaged by iOS platform team
Type
Projects
Status
Not started