WebUI NTP: shortcuts, disabled most-visited drag for touch and fixes
When custom links are disabled, the shortcut tiles shouldn't be draggable. For touch, the drag start is initiated by a 'touchstart' event. This CL disables the drag for this situation. When using touch, 'touchmove' scrolls the page content. This is not desired for draggable elements like the custom shortcuts. For this reason 'touch-action' is set to 'none'. The location of the dragging tile when using touch is not correct. The code was using |pageX| and |pageY| which takes into account the scroll position. When there is a non-zero scroll offset, the location of the dragging element is incorrect. |clientX| and |clientY| should be used instead. Bug: 1161486 Change-Id: Ie0ae9c08fb396fe2d19b4c294a4698cf57184b3d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2630007 Commit-Queue: Esmael Elmoslimany <aee@chromium.org> Commit-Queue: Moe Ahmadi <mahmadi@chromium.org> Reviewed-by:Moe Ahmadi <mahmadi@chromium.org> Auto-Submit: Esmael Elmoslimany <aee@chromium.org> Cr-Commit-Position: refs/heads/master@{#843798}
Showing
Please register or sign in to comment