jQuery UI Menubar Phantom Submenu Issue -


i creating jquery menubar, , looking weird effect when mouse on top level menu item has submenu first item has sub menu. if mouse in , out (moving left , right on view menu item) 20 times, start see view>encoding sub-submenu moving more , more right.

i can recreate issue modified version of menubar demo example. on firefox 20.0.1.

see here: http://jsfiddle.net/njjgm/

i figure finding right edge of subsub menu , setting new left edge of same subsub menu position... if slow down opening or fix positioning math shouldn't have bug.

i'm looking in jquery.ui.menubar.js file see if can adjust settimeouts, or fix subsub menu positioning not having luck.

i'm looking @ (from jquery.ui.menubar.js line 262):

__applymousebehaviorforsubmenuhavingmenuitem: function (input, menubar) {      var menu = input.next( menubar.options.menuelement ),         mousebehaviorcallback = function( event ) {             // ignore triggered focus event             if ( event.type === "focus" && !event.originalevent ) {                 return;             }              if (event.type === "mouseenter") {                  this.element.find(":focus").focusout();                 if (this.stashedopenmenu) {                                          this._open( event, menu);                 }                 this.stashedopenmenu = undefined;             }             if ((this.open && event.type === "mouseenter")                                 || this.options.autoexpand) {                  if (this.options.autoexpand) {                      cleartimeout( this.closetimer );                 }                 this._open( event, menu );             }         }; 

and @ this: (from jquery.ui.menubar.js line 68)

focusin: function( event ) {             cleartimeout( menubar.closetimer );         },         focusout: function( event ) {             menubar.closetimer = settimeout (function() {                 menubar._close( event );             }, 150 );         },         "mouseleave .ui-menubar-item": function( event ) {             if ( menubar.options.autoexpand ) {                 menubar.closetimer = settimeout( function() {                     menubar._close( event );                 }, 150 );             }         },         "mouseenter .ui-menubar-item": function( event ) {             cleartimeout( menubar.closetimer );         } 

has jquery ui menubar experience seen , fixed before? know fix settimeout? hoverintent seems use same set/cleartimeout technique menubar, don't want rip out logic menubar add in. suggestions welcome. thanks.

well found work around issue, though didn't fix buggy positioning (but think found fixed).

the code default selects first list element in opened menu, , if element has menu too, menu opens. took out code puts focus on first child element (why need that?)

from jquery.ui.menubar.js line 451

this.active = menu         .show()         .position($.extend({             of: button         }, this.options.position));         //.removeattr("aria-hidden")         //.attr("aria-expanded", "true")         //.menu("focus", event, menu.children(".ui-menu-item").first() )         // todo need comment here why both events triggered         //.focus()         //.focusin(); 

and presto-changeo! no more phantom drop down menus... have tried figure out menu.position worked me.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -