Skip to content

Commit 69da04a

Browse files
committed
fix(widget): restore .bind(this) for mouse event handlers to prevent TypeError on drag
1 parent ef9f14d commit 69da04a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

js/widgets/widgetWindows.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ class WidgetWindow {
9191
this._setupLanguage();
9292

9393
// Global watchers
94+
this._dragTopHandler = this._dragTopHandler.bind(this);
95+
this._docMouseMoveHandler = this._docMouseMoveHandler.bind(this);
96+
this._docMouseDownHandler = this._docMouseDownHandler.bind(this);
97+
9498
document.addEventListener("mouseup", this._dragTopHandler, true);
9599
document.addEventListener("mousemove", this._docMouseMoveHandler, true);
96100
document.addEventListener("mousedown", this._docMouseDownHandler, true);

0 commit comments

Comments
 (0)