-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
issue: bugDescribes why the code or behaviour is wrongDescribes why the code or behaviour is wrong
Description
Check for duplicates
- I have searched for similar issues before opening a new one.
Description
When using Blockly, a Chrome console warning appears about a non-passive event listener being added to a scroll-blocking wheel event.
This warning seems to occur when both move.wheel and zoom.wheel are enabled in the Blockly.inject options. Functionally, the workspace behaves as expected (mouse wheel scrolls the workspace, and Ctrl + mouse wheel zooms), and there are no noticeable performance issues. However, the warning is consistently logged, and I’m concerned about potential future implications.
I’d like to confirm whether this behavior is expected and whether there is a recommended way to avoid this warning.
Reproduction steps
- Use Blockly v12
- Inject a Blockly workspace with both move.wheel and zoom.wheel enabled:
Blockly.inject(blocklyDiv, {
move: {
scrollbars: true,
drag: true,
wheel: true,
},
zoom: {
wheel: true,
},
});- Open Chrome DevTools and check the console.
- Scroll the mouse wheel over the workspace or use Ctrl + mouse wheel to zoom.
- Observe the non-passive event listener warning in the console.
Priority
Low
- There is no functional or performance issue observed.
- This is mainly a console warning and a potential future concern rather than a blocking bug.
Stack trace
[Violation] Added non-passive event listener to a scroll-blocking 'wheel' event.
Consider marking event handler as 'passive' to make the page more responsive.
See https://www.chromestatus.com/feature/5745543795965952
L @ blockly-IxHXmmBh.js:1
createDom @ blockly-IxHXmmBh.js:661
init @ blockly-IxHXmmBh.js:657
init @ blockly-IxHXmmBh.js:757
...Screenshots
Browsers
Chrome desktop
Metadata
Metadata
Assignees
Labels
issue: bugDescribes why the code or behaviour is wrongDescribes why the code or behaviour is wrong
Type
Projects
Status
In Progress