Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit 1c18f6a

Browse files
Googlernshahan
authored andcommitted
Make mouse events with the shift modifier key a non-standard mouse event in isStandardMouseEvent.
PiperOrigin-RevId: 193352324
1 parent f33aa72 commit 1c18f6a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/utils/browser/events/events.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,11 @@ bool modifierKeyUsed(dynamic /* MouseEvent | KeyboardEvent */ event) {
3434

3535
/// Whether the [MouseEvent] was initiated with the primary mouse button and no
3636
/// modifier keys were used.
37-
bool isStandardMouseEvent(MouseEvent event) =>
38-
!(event.button != 0 || event.altKey || event.ctrlKey || event.metaKey);
37+
bool isStandardMouseEvent(MouseEvent event) => !(event.button != 0 ||
38+
event.altKey ||
39+
event.ctrlKey ||
40+
event.metaKey ||
41+
event.shiftKey);
3942

4043
typedef bool Predicate<T>(T value);
4144

0 commit comments

Comments
 (0)