Commit 939f1a0e authored by Kristi Park's avatar Kristi Park Committed by Commit Bot

[NTP] Do not reorder if the edit shortcut menu is clicked

Add edit shortcut menu check before starting the reorder flow. This will
prevent the flow from being initiated when the edit shortcut menu is
clicked.

Bug: 851335
Change-Id: I064d3553b52215152671d9d4c1573ca9450dec0a
Reviewed-on: https://chromium-review.googlesource.com/c/1325075Reviewed-by: default avatarMathieu Perreault <mathp@chromium.org>
Commit-Queue: Kristi Park <kristipark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606282}
parent 3b3d1635
...@@ -643,7 +643,9 @@ function setupReorder(tile) { ...@@ -643,7 +643,9 @@ function setupReorder(tile) {
// Starts the reorder flow after the user has held the mouse button down for // Starts the reorder flow after the user has held the mouse button down for
// |REORDER_TIMEOUT_DELAY|. // |REORDER_TIMEOUT_DELAY|.
tile.addEventListener('mousedown', (event) => { tile.addEventListener('mousedown', (event) => {
if (event.button == 0 /* LEFT CLICK */) { // Do not reorder if the edit menu was clicked.
if (event.button == 0 /* LEFT CLICK */ &&
!event.target.classList.contains(CLASSES.MD_MENU)) {
let timeout = -1; let timeout = -1;
// Cancel the timeout if the user drags the mouse off the tile and // Cancel the timeout if the user drags the mouse off the tile and
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment