Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit adf096c8 authored by Ben Murdoch's avatar Ben Murdoch
Browse files

Increase WebView.TAP_TIMEOUT to 300ms to account for trackpad taps.

Track pad taps will have a duration of 300ms, so we need to take this
into account when handling touch events in the WebView.

Bug: 5076008
Change-Id: Ia0d7ad88637b1f6b85440283ab29086a5f60fdba
parent ba86443e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -537,7 +537,10 @@ public class WebView extends AbsoluteLayout
    // This should be ViewConfiguration.getTapTimeout()
    // But system time out is 100ms, which is too short for the browser.
    // In the browser, if it switches out of tap too soon, jump tap won't work.
    private static final int TAP_TIMEOUT = 200;
    // In addition, a double tap on a trackpad will always have a duration of
    // 300ms, so this value must be at least that (otherwise we will timeout the
    // first tap and convert it to a long press).
    private static final int TAP_TIMEOUT = 300;
    // This should be ViewConfiguration.getLongPressTimeout()
    // But system time out is 500ms, which is too short for the browser.
    // With a short timeout, it's difficult to treat trigger a short press.