Skip to content

Commit

Permalink
Fix default passive option (#2111)
Browse files Browse the repository at this point in the history
  • Loading branch information
mc1098 authored Oct 16, 2021
1 parent 05728e1 commit 98821c4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/yew/src/virtual_dom/listeners.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,8 @@ impl GlobalHandlers {
&{
let mut opts = web_sys::AddEventListenerOptions::new();
opts.capture(true);
if desc.passive {
opts.passive(true);
}
// We need to explicitly set passive to override any browser defaults
opts.passive(desc.passive);
opts
},
)
Expand Down

0 comments on commit 98821c4

Please sign in to comment.