DEV: Fix an event reference in widget hooks (#29108)

(and drop an unused eslint setting)
This commit is contained in:
Jarek Radosz 2024-10-08 01:26:39 +09:00 committed by GitHub
parent d6961c9a35
commit b614b72852
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -1,4 +1,3 @@
/*eslint no-loop-func:0*/
import $ from "jquery";
const CLICK_ATTRIBUTE_NAME = "_discourse_click_widget";
@ -134,7 +133,7 @@ function dragStart(e) {
function drag(e) {
const widget = _currentlyDraggingElement[DRAG_ATTRIBUTE_NAME];
if (event.type === "mousemove") {
if (e.type === "mousemove") {
widget.drag(e);
} else {
const tt = e.targetTouches[0];