I want to stop the disappearance of the jQueryUI menu .
Same context: FireFox 43, Linux / Debian / Sid, Jquery2.2, JqueryUI1.11.4, for this question; alpha-stage MELT monitor , free GPL software on Linux / Debian with the latest Firefox 38 or 43 on Linux; this is commit b505eccc1 ... on github
(JsFiddle MVCE example at the end of the question)
In my webroot/nanoedit.js file I have a global variable mom_menucmdel that has a JqueryUI menu (drop down menu) in it. The mom_removecmdmenu function clears the globality and removes this menu from the DOM.
I want this menu to disappear and be deleted in just over 9 seconds if the user is not interacting. But if the user moves the mouse inside the menu, I want the fading to stop. So I coded:
var curmenu = mom_menucmdel; curmenu.mousemove (function(ev) { console.log("momdelayrepl movefinishing ev=", ev, " curmenu=", curmenu); curmenu.finish(); }); setTimeout(function() { console.log("mom_cmdkeypress-delayedreplmenudestroy curmenu=", curmenu); curmenu.delay(100).fadeOut(800+75*dollvalseq.length, function () { console.log ("momdelayrepl finalfaderemove curmenu=", curmenu); mom_removecmdmenu(); }); }, 9500);
next to line 427 of this nanoedit.js ; I understand that finish will abort the animation. But that does not work. Fading remains, and the menu disappears even after the mouse moves.
If you are brave enough to compile a MELT monitor, look at http: //localhost.localdomain: 8086 / nanoedit.html , enter $ e in textearea, then press the esc key.
JsFiddle Example (MVCE)
See this JsFiddle , which is a simplified version above; run it twice. First press the button and wait at least 10 seconds. The menu disappears and disappears. Then run it again, click the button and move the mouse inside the menu (maybe even selecting some item), the menu still disappears after about 10 seconds, but I want it to stay, possibly endlessly (in my nanoedit.js code the select function will delete it, in this JsFiddle I don't care)!