Results 1 to 3 of 3

Thread: Ext JS 5.1 - Post GA Patches

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User dongryphon's Avatar
    Join Date
    Jul 2009
    Location
    Kansas
    Posts
    1,748

    Default Ext JS 5.1 - Post GA Patches

    If we find any issues beyond the GA that we feel have sufficiently broad impact, we will post overrides here and describe the issue.
    Don Griffin

    "Use the source, Luke!"

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,257

    Default

    EXTJS-16166 - Unable to use home/end/arrow navigation keys inside data views & grid editors.

    Code:
    Ext.define('Ext.patch.EXTJS16166', {
        override: 'Ext.view.View',
        compatibility: '5.1.0.107',
        handleEvent: function(e) {
            var me = this,
                isKeyEvent = me.keyEventRe.test(e.type),
                nm = me.getNavigationModel();
    
            e.view = me;
            
            if (isKeyEvent) {
                e.item = nm.getItem();
                e.record = nm.getRecord();
            }
    
            // If the key event was fired programatically, it will not have triggered the focus
            // so the NavigationModel will not have this information.
            if (!e.item) {
                e.item = e.getTarget(me.itemSelector);
            }
            if (e.item && !e.record) {
                e.record = me.getRecord(e.item);
            }
    
            if (me.processUIEvent(e) !== false) {
                me.processSpecialEvent(e);
            }
            
            // We need to prevent default action on navigation keys
            // that can cause View element scroll unless the event is from an input field.
            // We MUST prevent browser's default action on SPACE which is to focus the event's target element.
            // Focusing causes the browser to attempt to scroll the element into view.
            
            if (isKeyEvent && !Ext.fly(e.target).isInputField()) {
                if (e.getKey() === e.SPACE || e.isNavKeyPress(true)) {
                    e.preventDefault();
                }
            }
        }
    });
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  3. #3
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    EXTJS-15525 - Syncing of newly client-side created records with a server results in the new record being permanently selected

    http://www.sencha.com/forum/showthread.php?293654

    Code:
    Ext.define('Ext.overrides.util.Collection', {
        override: 'Ext.util.Collection',
        compatibility: '5.1.0.107',
    
        updateKey: function (item, oldKey) {
            var me = this,
                map = me.map,
                indices = me.indices,
                source = me.getSource(),
                newKey;
    
            if (source && !source.updating) {
                // If we are being told of the key change and the source has the same idea
                // on keying the item, push the change down instead.
                source.updateKey(item, oldKey);
            }
            // If there *is* an existing item by the oldKey and the key yielded by the new item is different from the oldKey...
            else if (map[oldKey] && (newKey = me.getKey(item)) !== oldKey) {
                if (oldKey in map || map[newKey] !== item) {
                    if (oldKey in map) {
                        //<debug>
                        if (map[oldKey] !== item) {
                            Ext.Error.raise('Incorrect oldKey "' + oldKey +
                                            '" for item with newKey "' + newKey + '"');
                        }
                        //</debug>
    
                        delete map[oldKey];
                    }
    
                    // We need to mark ourselves as updating so that observing collections
                    // don't reflect the updateKey back to us (see above check) but this is
                    // not really a normal update cycle so we don't call begin/endUpdate.
                    me.updating++;
    
                    me.generation++;
                    map[newKey] = item;
                    if (indices) {
                        indices[newKey] = indices[oldKey];
                        delete indices[oldKey];
                    }
    
                    me.notify('updatekey', [{
                        item: item,
                        newKey: newKey,
                        oldKey: oldKey
                    }]);
    
                    me.updating--;
                }
            }
        }
    });

Posting Permissions

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