Skip to content

Commit

Permalink
Fix TJSGlassPane wheel event preventDefault warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
typhonrt committed Oct 26, 2024
1 parent 41c3965 commit 9b54515
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion _dist/component/application/TJSGlassPane.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@
if (captureInput)
{
event.preventDefault();
// `wheel` event types can't use `preventDefault` in capture / passive mode.
// see: https://chromestatus.com/feature/6662647093133312
if (event?.type !== 'wheel') { event.preventDefault(); }
event.stopImmediatePropagation();
}
Expand Down
5 changes: 4 additions & 1 deletion src/component/application/TJSGlassPane.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@
if (captureInput)
{
event.preventDefault();
// `wheel` event types can't use `preventDefault` in capture / passive mode.
// see: https://chromestatus.com/feature/6662647093133312
if (event?.type !== 'wheel') { event.preventDefault(); }
event.stopImmediatePropagation();
}
Expand Down

0 comments on commit 9b54515

Please sign in to comment.