Contact emails
Design doc
Summary
Do touch adjustment on “touchstart” event, use this adjusted target for the following touch events and preserve original X/Y of touch events. Apply the adjusted point to corresponding gesture event, so that touch events and subsequent mouse events will have the same target. This will be implemented behind a experimental flag “UnifiiedTouchAdjustment”.
Motivation
Currently, we do touch adjustment for gesture events, but not for touch events. However, this will cause pointer and touch events to have different targets from subsequent mouse events, which is extremely confusing. For example, touchend event and click event from one touch might trigger two different targets. (e.g. crbug/595112)
We’d like to adjust target for all related events but preserve original X/Y of raw touch events. Therefore, there is less confusion about the touch target. And developers who want the original touch target (without adjustment) can use the coordinates to do hit test.
A UMA metric will be added to measure distance between tap point and adjusted point (0 if not adjusted). This metric is to prove 1. Most use cases are not affected. 2. We are using the appropriate maximum adjust distance.
Risks
Interoperability and Compatibility
Touch adjustment is not spec’ed feature. Each browser has different implementation.
Edge: Adjust both coordinates and targets for touch events & click events
Firefox: no touch adjustment
Safari: Adjusts ‘click’ target and coordinates, no adjustment on touch events (similar to chrome current behavior)
Web developers: No signals
Compatibility risk should be low. This is a minor change on touch event target.Touch event coordinates will not be change. And it shouldn’t change those mouse events which generated by touch. Likely none will notice the change.
Debuggability
Yes, touch adjustment is supported by DevTools emulator.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes.
Link to entry on the feature dashboard
https://www.chromestatus.com/feature/4895751150764032
Requesting approval to ship?
No
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAGbAJuF8MW0K9Y1oO0yfRB834tBsX0v8s4%3DwxEEV0OMHhUMfow%40mail.gmail.com.