Hybrid View

  1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    3
    Vote Rating
    0
    sten82 is on a distinguished road

      0  

    Default Unanswered: How can I remove the keypress event listener in menu

    Unanswered: How can I remove the keypress event listener in menu


    Hello,

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

    Code:
    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

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,197
    Vote Rating
    482
    Answers
    690
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Perhaps the API is doing this? try the following example:
    http://jsfiddle.net/6G4Ty/

    Scott.

  3. #3
    Sencha User
    Join Date
    Sep 2012
    Posts
    3
    Vote Rating
    0
    sten82 is on a distinguished road

      0  

    Default


    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.

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,197
    Vote Rating
    482
    Answers
    690
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    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.

  5. #5
    Sencha User
    Join Date
    Sep 2012
    Posts
    3
    Vote Rating
    0
    sten82 is on a distinguished road

      0  

    Default


    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

Thread Participants: 1

Tags for this Thread