Skip to content

Commit

Permalink
Allow mouse drag from inside a <popup> to outside
Browse files Browse the repository at this point in the history
With this CL, mousing-down inside a <popup> and dragging to outside
that <popup> will no longer light-dismiss the popup. This also changes
the trigger for light dismiss from "click" to "mousedown", which
mirrors platform conventions.

Bug: 1168738
Change-Id: I23aa035107409b9fb2f36ee90ef8a3c08d8e0c62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2890150
Commit-Queue: Mason Freed <masonf@chromium.org>
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Ionel Popescu <iopopesc@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#882881}
  • Loading branch information
Mason Freed authored and chromium-wpt-export-bot committed May 14, 2021
1 parent 0b4f125 commit 1ec3df0
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -159,13 +159,14 @@
},'An invoking element that was not used to invoke the popup should NOT be part of the ancestor chain');

popup1.show();
popup2.show();
popup2.show(); // Popup1 is an ancestral element for popup2.
assert_true(popup1.open);
assert_true(popup2.open);
const drag_actions = new test_driver.Actions();
await drag_actions.pointerMove(0,0,{origin: popup1})
// Drag *from* popup2 *to* popup1 (its ancestor).
await drag_actions.pointerMove(0,0,{origin: popup2})
.pointerDown({button: drag_actions.ButtonType.LEFT})
.pointerMove(0,0,{origin: popup2})
.pointerMove(0,0,{origin: popup1})
.pointerUp({button: drag_actions.ButtonType.LEFT})
.send();
test(t => {
Expand Down

0 comments on commit 1ec3df0

Please sign in to comment.