Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[webview_flutter] Webview doesn't trigger touchstart when longpressed #37927

Closed
wingohtcom opened this issue Aug 9, 2019 · 4 comments
Closed

Comments

@wingohtcom
Copy link

Steps to Reproduce

  1. clone https://github.com/wingohtcom/flutter-webview-longpress-bug
  2. cd html && python -m SimpleHTTPServer 3000
  3. change initialUrl to the address that points to your LAN IP
  4. run flutter in an android emulator or real device
  5. long press the webview.
  6. see no touchstart event is triggered.

This only happens to Android, and it seems flutter is trying to detect if the touch is a long press. If so, it swallows it; if not (e.g., touch and quickly lift), touchstart & touchend are triggered.

Logs

too long to paste here, don't really think it's relevant. App can run without problem.
Analyzing webview...                                                    
No issues found! (ran in 4.8s)
[✓] Flutter (Channel dev, v1.8.3, on Mac OS X 10.13.6 17G8030, locale en-CN)
    • Flutter version 1.8.3 at /Users/user/Library/flutter
    • Framework revision e4ebcdf6f4 (13 days ago), 2019-07-27 11:48:24 -0700
    • Engine revision 38ac5f30a7
    • Dart version 2.5.0 (build 2.5.0-dev.1.0 0ca1582afd)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/user/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • CocoaPods version 1.7.4

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 35.3.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] VS Code (version 1.36.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.3.0

[✓] Connected device (2 available)
    • Android SDK built for x86 64 • emulator-5556                        • android-x64 • Android 9 (API 28) (emulator)
    • iPhone XR                    • 5A35A5F1-A8A5-4169-9B93-D4F7FA3EFD2A • ios         • iOS 12.1 (simulator)

• No issues found!
@wingohtcom wingohtcom changed the title Webview doesn't trigger touchstart when longpressed [webview_flutter] Webview doesn't trigger touchstart when longpressed Aug 12, 2019
@wingohtcom
Copy link
Author

Wondering if webview_flutter author could take a look @amirh? This is a blocker for us.

Thanks.

@amirh
Copy link
Contributor

amirh commented Aug 13, 2019

The plugin is currently filtering long presses due to issues with text selection (#24585).

I'm closing this issue as the text selection issues are tracked in other issues and once they are resolved we will stop filtering long presses.

@amirh amirh closed this as completed Aug 13, 2019
@Nico04
Copy link

Nico04 commented Oct 8, 2019

I use the webview with krpano panorama viewer, and a long press on the panorama makes the webview very very laggy/slow...
Manually removing the longpress 'filtering' on the webview solved my issue.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants