Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extjs Submenus disappear on Chrome 43

How to fix submenus disappearing in Chrome 43?

Using Extjs 4.

This was working on previous versions of Chrome.

like image 673
code4jhon Avatar asked Jan 08 '23 08:01

code4jhon


1 Answers

This overrides needs to be added in order to fix this.

https://www.sencha.com/forum/showthread.php?301116-Submenus-disappear-in-Chrome-43-beta

(Thanks to festr user on Sencha forum - thought this needed to be on SO too)

// fix hide submenu (in chrome 43)
Ext.override(Ext.menu.Menu, {
    onMouseLeave: function(e) {
    var me = this;


    // BEGIN FIX
    var visibleSubmenu = false;
    me.items.each(function(item) { 
        if(item.menu && item.menu.isVisible()) { 
            visibleSubmenu = true;
        }
    })
    if(visibleSubmenu) {
        //console.log('apply fix hide submenu');
        return;
    }
    // END FIX


    me.deactivateActiveItem();


    if (me.disabled) {
        return;
    }


    me.fireEvent('mouseleave', me, e);
    }
});
like image 173
code4jhon Avatar answered Jan 10 '23 22:01

code4jhon