mirror of
https://github.com/google/blockly.git
synced 2026-01-08 17:40:09 +01:00
Work around WebKit bug that prevents scrolling/zooming the workspace.
This commit is contained in:
@@ -877,6 +877,10 @@ Blockly.WorkspaceSvg.prototype.createDom = function(opt_backgroundClass) {
|
||||
if (!this.isFlyout) {
|
||||
Blockly.browserEvents.conditionalBind(
|
||||
this.svgGroup_, 'mousedown', this, this.onMouseDown_, false, true);
|
||||
// This no-op works around https://bugs.webkit.org/show_bug.cgi?id=226683,
|
||||
// which otherwise prevents zoom/scroll events from being observed in
|
||||
// Safari. Once that bug is fixed it should be removed.
|
||||
document.body.addEventListener('wheel', function(e) {});
|
||||
Blockly.browserEvents.conditionalBind(
|
||||
this.svgGroup_, 'wheel', this, this.onMouseWheel_);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user