PDA

View Full Version : How can I remove the keypress event listener in menu



sten82
27 Sep 2012, 6:40 AM
Hello,

is there any possibility to remove the keypress event from menu?



Ext.create('Ext.menu.Menu', {
width: 100,
height: 100,
margin: '0 0 10 0',
floating: false, // usually you want this set to True (default)
renderTo: Ext.getBody(), // usually rendered by it's containing component
items: [{
text: 'regular item 1'
},{
text: 'regular item 2'
},{
text: 'regular item 3'
}]
});


This example is from the docs. If I click on any menu button and press the left key on my keyboard the complete menu disapears. Can I disable this behavoir?

Thanks in advance,
carsten

scottmartin
1 Oct 2012, 7:55 AM
Perhaps the API is doing this? try the following example:
http://jsfiddle.net/6G4Ty/

Scott.

sten82
3 Oct 2012, 11:51 PM
yes, I'm sure the API does it. But I want to remove this behaviour. As you can see in jsfiddle you can hide the menu by clicking on it and pressing the left arrow. And there is no chance to bring it back except reloading the page.

scottmartin
4 Oct 2012, 7:32 AM
I am unable duplicate .. from fiddle:

-load app, click on 2nd menu item; press left arrow key .. menu still there.

Perhaps you can provide more detail.
Exact ExtJS4 version
Browser / OS

Scott.

sten82
4 Oct 2012, 8:02 AM
I can duplicate it from this Fiddle Link. Maybe my description was a bit misleading so I checked up what to do exactly.

I hovered over the "regular Item". While the mouse is over this Item I pressed the left arrow key on my Keyboard and the whole Menu disappears.

ExtJs: 4.1.1 (Like used in Fiddle)
Browser: Firefox 15.0.1, SRWare Iron 21.0
OS: Win 7

Carsten