Skip to content

Commit

Permalink
fix(navigation/zoomscroll): hook up with canvas focused state
Browse files Browse the repository at this point in the history
Related to #662
  • Loading branch information
nikku committed Dec 19, 2024
1 parent 90cd1e7 commit d06b3cd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/navigation/zoomscroll/ZoomScroll.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
event as domEvent,
closest as domClosest
event as domEvent
} from 'min-dom';

import {
Expand Down Expand Up @@ -116,8 +115,7 @@ ZoomScroll.prototype.zoom = function zoom(delta, position) {

ZoomScroll.prototype._handleWheel = function handleWheel(event) {

// event is already handled by '.djs-scrollable'
if (domClosest(event.target, '.djs-scrollable', true)) {
if (!this._canvas.isFocused()) {
return;
}

Expand Down

0 comments on commit d06b3cd

Please sign in to comment.