Skip to content

Conversation

AlexandrTomin
Copy link

This change will be avoid twice click of button.

if (event.type === "mousemove") {break;} to if (event.type === "mousedown") {break;}

This change will be avoid twice click of button.
@AlexandrTomin AlexandrTomin changed the title Update litegraph.js Function in button widgets is called twice Apr 22, 2020
@atlasan
Copy link
Contributor

atlasan commented Jan 8, 2021

This is true. I would instead change the code to call the function only with the correct event instead of breaking on a "bad" one.

if (event.type === "mousedown"){ // or "mouseup" ?

}

@jagenjo
Copy link
Owner

jagenjo commented Jan 8, 2021

hard to do the merge, the automatic gets crazy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants