Skip to content

Commit

Permalink
Add check to see if event is cancelable before trying to cancel it.
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewLugg committed Nov 10, 2024
1 parent 6eb459f commit ce84c3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/display/stage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ class Stage extends DisplayObjectContainer {
//----------------------------------------------------------------------------

void _onTouchEvent(html.TouchEvent event) {
if (preventDefaultOnTouch) event.preventDefault();
if (preventDefaultOnTouch && event.cancelable == true) event.preventDefault();

final eventType = event.type;
final altKey = event.altKey;
Expand Down

0 comments on commit ce84c3d

Please sign in to comment.