Results 1 to 4 of 4

Thread: infinite loop

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Aug 2014
    Bath, UK

    Default infinite loop

    Ext version tested:
    • Ext CLassic
    Browser versions tested against:
    • Chrome
    • When typing keys into a menu that has no menu items with no text the browser can hang.
    Steps to reproduce the problem:

    I've made a copy of a different Sechan fiddle and used that. See:

    To reproduce: Open the number menu and select an option and sort the grid.
    Open the number menu again, start typing.

    Sometimes the browser freezes completely.The problem is in the onShortcutKey method in Specifically:

    onShortcutKey: function(keyCode, e) {
        var shortcutChar = String.fromCharCode(e.getCharCode()),
                items = this.query('>[text]'),
                len = items.length,
                item = this.lastFocusedChild,
                focusIndex = Ext.Array.indexOf(items, item),
                i = focusIndex;
            // Loop through all items which have a text property starting at the one after the current focus.
            for (;;) {
                if (++i === len) {
                    i = 0;
                item = items[i];
                // Looped back to start - no matches
                if (i === focusIndex) {
                // Found a text match
                if (item.text && item.text[0].toUpperCase() === shortcutChar) {
    If the previously focussed menu item is an item that has no text field then
    focusIndex = Ext.Array.indexOf(items, item)
    will be -1 and the loop will never finish because:

    i will never be === -1.

  2. #2
    Sencha User
    Join Date
    Aug 2014
    Bath, UK


    One further note. The code in the Ext 6.0 build looks the same, so probably a bug there too.

  3. #3
    Sencha Premium Member
    Join Date
    Oct 2014

    Default Fiddle

    The fiddle must have changed or something. It is about something else. I have it reproduced here, though:

  4. #4
    Sencha Premium User
    Join Date
    Feb 2009
    Bath, UK


    Still looks to be an issue in Ext 6.7.0...

Similar Threads

  1. Replies: 1
    Last Post: 19 May 2012, 5:09 AM
  2. Replies: 0
    Last Post: 20 Oct 2011, 2:45 PM
  3. Replies: 1
    Last Post: 26 Feb 2010, 2:06 PM
  4. Mouse click does not work on menu items(when menu is rendered as context menu)
    By anilcs0405 in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 3 Aug 2009, 5:55 AM
  5. Replies: 3
    Last Post: 8 Apr 2008, 11:52 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts