mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-05 07:30:11 +00:00
Fix widget buttons registering clicks twice
This commit is contained in:
@@ -8853,16 +8853,15 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
//inside widget
|
||||
switch (w.type) {
|
||||
case "button":
|
||||
if (event.type === "mousemove") {
|
||||
break;
|
||||
}
|
||||
if (w.callback) {
|
||||
setTimeout(function() {
|
||||
w.callback(w, that, node, pos, event);
|
||||
}, 20);
|
||||
}
|
||||
w.clicked = true;
|
||||
this.dirty_canvas = true;
|
||||
if (event.type === "mousedown") {
|
||||
if (w.callback) {
|
||||
setTimeout(function() {
|
||||
w.callback(w, that, node, pos, event);
|
||||
}, 20);
|
||||
}
|
||||
w.clicked = true;
|
||||
this.dirty_canvas = true;
|
||||
}
|
||||
break;
|
||||
case "slider":
|
||||
var range = w.options.max - w.options.min;
|
||||
|
||||
Reference in New Issue
Block a user