Skip to content

[PlatformView][iOS] Touch gesture on InteractiveViewer stops working if you touch your finger first and then touch with Apple Pencil on iPad #136244

Closed

Description

@wolru

[Edit: internal Google bug b/341930773]

Is there an existing issue for this?

Steps to reproduce

If you touch with your finger first and touch with Apple Pencil second while first touch is maintained , the callback function not called.
On the contrary, if you touch with the Apple Pencil first and touch with finger later, it will work normally
Both work fine on Android

The difference is,
On Android, when the second touch is occur, the onPointerUp event of first touch is called and the onPointerDown event of second touch is called . Not called in ipad

Expected results

touch works expected

Actual results

touch not working

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[Paste your output here]

Activity

  1. added
    in triagePresently being triaged by the triage team
    on Oct 11, 2023
  2. huycozy commented on Oct 11, 2023

    @huycozy
    Member

    Hi @wolru
    Please provide information in the remaining fields in the issue template. More specifically:

  3. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Oct 11, 2023
  4. wolru commented on Oct 19, 2023

    @wolru
    Author

    @huycozy Hi,
    I found a problematic situation. When you use a Webview in InteractiveViewer, touch the app pencil while touching it first with your finger will not working

    20231019_143937.mp4
    InteractiveViewer(
      child: InAppWebView(
        initialOptions: InAppWebViewGroupOptions(
          crossPlatform: InAppWebViewOptions(
            supportZoom: false,
            javaScriptEnabled: true,
            disableHorizontalScroll: true,
            disableVerticalScroll: true,
            disableContextMenu: true,
            useShouldOverrideUrlLoading: true,
            mediaPlaybackRequiresUserGesture: false,
            transparentBackground: true,
          ),
        ),
        initialUrlRequest: URLRequest(url: Uri.parse('https://www.google.com/')),
      ),
    ),
  5. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Oct 19, 2023
  6. huycozy commented on Oct 19, 2023

    @huycozy
    Member

    You are using InAppWebView which is 3rd party plugin we are not sure if the issue could be related to/caused by it. Could you retry with webview_flutter instead?

  7. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Oct 19, 2023
  8. wolru commented on Oct 21, 2023

    @wolru
    Author

    @huycozy The same issue occurs when using webview_flutter

  9. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Oct 21, 2023
  10. huycozy commented on Oct 23, 2023

    @huycozy
    Member

    Please provide a completed and minimal reproducible code sample so that we can verify the issue. Also, please provide the output of flutter doctor -v as well.

  11. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Oct 23, 2023
  12. hongmono commented on Oct 24, 2023

    @hongmono

    Please provide a completed and minimal reproducible code sample so that we can verify the issue. Also, please provide the output of flutter doctor -v as well.

    import 'package:flutter/gestures.dart';
    import 'package:flutter/material.dart';
    import 'package:webview_flutter/webview_flutter.dart';
    
    void main() {
      runApp(const MyApp());
    }
    
    class MyApp extends StatelessWidget {
      const MyApp({super.key});
    
      // This widget is the root of your application.
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          title: 'Flutter Demo',
          theme: ThemeData(
            colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
            useMaterial3: true,
          ),
          home: const MyHomePage(title: 'Flutter Demo Home Page'),
        );
      }
    }
    
    class MyHomePage extends StatefulWidget {
      const MyHomePage({super.key, required this.title});
    
      final String title;
    
      @override
      State<MyHomePage> createState() => _MyHomePageState();
    }
    
    class _MyHomePageState extends State<MyHomePage> {
      double scale = 1;
      double previousScale = 1;
      Offset previousOffset = Offset.zero;
      late WebViewController controller;
    
      @override
      void initState() {
        controller = WebViewController()..loadRequest((Uri.parse('https://www.google.com')));
    
        super.initState();
      }
    
      @override
      Widget build(BuildContext context) {
        return Scaffold(
          appBar: AppBar(
            backgroundColor: Theme.of(context).colorScheme.inversePrimary,
            title: Text(widget.title),
          ),
          body: InteractiveViewer(
            child: IgnorePointer(
              ignoring: true,
              child: WebViewWidget(controller: controller),
            ),
          ),
        );
      }
    }
    
    [✓] Flutter (Channel stable, 3.13.8, on macOS 14.0 23A344 darwin-arm64, locale ko-KR)
        • Flutter version 3.13.8 on channel stable at /opt/homebrew/Caskroom/flutter/3.13.6/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 6c4930c4ac (5 days ago), 2023-10-18 10:57:55 -0500
        • Engine revision 767d8c75e8
        • Dart version 3.1.4
        • DevTools version 2.25.0
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
        • Android SDK at /Users/hongmono/Library/Android/sdk
        • Platform android-34, build-tools 34.0.0
        • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 15A507
        • CocoaPods version 1.13.0
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2022.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
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    
    [✓] IntelliJ IDEA Ultimate Edition (version 2023.2.3)
        • IntelliJ at /Applications/IntelliJ IDEA.app
        • Flutter plugin version 75.1.4
        • Dart plugin version 232.10072.19
    
  13. huycozy commented on Oct 25, 2023

    @huycozy
    Member

    Thank @hongmono for the reproduction code. However, I wonder how it can be drawn as in the demo video above. Looks like @wolru is using a draw app on the top layer?

    Could you provide the reproduction step-by-step? It would be better if there is a working example (native app?)for comparison.

  14. hongmono commented on Oct 26, 2023

    @hongmono

    @huycozy

    It's the same as @wolru's code: no touch event is fired after using a combination of finger gestures and apple pencil gestures on the webview, whether the webview is under the stack or as a child.

    Thank you for your interest.

  15. huycozy commented on Oct 26, 2023

    @huycozy
    Member

    no touch event is fired

    @hongmono Could you share the actual results of this? Do you mean the webview is not draggable? Is it caused by adding IgnorePointer?

    Also, to identify if this is webview or platform-views issue, you can try replacing webview to pure platform-view to see if the same result occurs. Please check my simple platform-view demo here for reference.

  16. 37 remaining items

  17. added
    r: fixedIssue is closed as already fixed in a newer version
    on Oct 11, 2024
  18. hellohuanlin commented on Oct 15, 2024

    @hellohuanlin
    Contributor

    Reopen since a customer reported that this broke the touch/gesture.

  19. removed
    r: fixedIssue is closed as already fixed in a newer version
    on Oct 16, 2024
  20. huycozy commented on Oct 17, 2024

    @huycozy
  21. added
    r: fixedIssue is closed as already fixed in a newer version
    on Oct 24, 2024
  22. github-actions commented on Nov 7, 2024

    @github-actions

    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 -v and a minimal reproduction of the issue.

  23. locked as resolved and limited conversation to collaborators on Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: platform-viewsEmbedding Android/iOS views in Flutter appscustomer: chalk (g3)f: gesturesflutter/packages/flutter/gestures repository.found in release: 3.13Found to occur in 3.13found in release: 3.16Found to occur in 3.16frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions