You found a bug! We've classified it as EXTJS-10824 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    974
    Vote Rating
    110
    Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all

      0  

    Default [4.2.1 GA] ComboBox selectOnTab and selectOnFocus issue

    [4.2.1 GA] ComboBox selectOnTab and selectOnFocus issue


    REQUIRED INFORMATION

    Ext version tested:
    • Ext 4.2.1 GA
    Browser versions tested against:
    • Chrome - FAIL
    • Safari - FAIL
    • IE9 - OK
    • FireFox - OK
    DOCTYPE tested against:
    • <!DOCTYPE html>
    Description:
    • A weird behavior can happen with two ComboBoxes with enabled selectOnTab and selectOnFocus options on some scenario in Chrome and Safari. It selects text in two ComboBoxes in rotation. It is OK in FireFox and IE9.
    Steps to reproduce the problem:
    • Click the first ComboBox - the text gets selected
    • Press Backspace to remove the text - the text gets erased and the list expands
    • Press Arrow Down twice - the Item 2 gets selected
    • Do not press Enter
    • Press Tab
    The result that was expected:
    • The second ComboBox is focused and its test is selected. It happens in FireFox and IE9.
    The result that occurs instead:
    • It selects text in the two ComboBoxes in rotation. It happens in Chrome and Safari.
    Test Case:

    Code:
    <!DOCTYPE html>
    <html>
    <head>
        <title>ComboBox selectOnTab and selectOnFocus issue</title>
    
        <link rel="stylesheet" href="../resources/css/ext-all.css" />
        
        <script src="../ext-all-dev.js"></script>
    
        <script>
            Ext.onReady(function () {
                Ext.create("Ext.form.field.ComboBox", {
                    renderTo: Ext.getBody(),
                    store: ["Item 1", "Item 2" ],
                    value: "Item 1",
                    selectOnFocus: true,
                    selectOnTab: true
                });
    
                Ext.create("Ext.form.field.ComboBox", {
                    renderTo: Ext.getBody(),
                    store: ["Item 1", "Item 2" ],
                    value: "Item 1",
                    selectOnFocus: true,
                    selectOnTab: true
                });
            });
        </script>
    </head>
    <body>
    
    </body>
    </html>
    Ext.NET - ASP.NET for Ext JS
    MVC and WebForms
    Examples | Twitter

  2. #2
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    3,359
    Vote Rating
    62
    Gary Schlosberg is a jewel in the rough Gary Schlosberg is a jewel in the rough Gary Schlosberg is a jewel in the rough

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    974
    Vote Rating
    110
    Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all

      0  

    Default


    We faced the same issue in another scenario and I have investigated a bit deeper.

    The key point is inside the TextField's beforeFocus:
    http://docs.sencha.com/extjs/4.2.1/#...od-beforeFocus
    Code:
    // see: http://code.google.com/p/chromium/issues/detail?id=4505
    if (Ext.isWebKit) {
        if (!me.inputFocusTask) {
            me.inputFocusTask = new Ext.util.DelayedTask(me.focusInput, me);
        }
        me.inputFocusTask.delay(1);
    } else {
        inputEl.dom.select();
    }
    The issue on chromium is not marked as fixed, but I tried without "if (Ext.isWebKit)" and it appears to help.
    Code:
    Ext.form.field.Text.override({
        beforeFocus : function(){
            var me = this,
                inputEl = me.inputEl,
                emptyText = me.emptyText,
                isEmpty;
    
            //me.callParent(arguments);
            Ext.form.field.Text.superclass.beforeFocus.apply(this, arguments);
    
            if ((emptyText && !Ext.supports.Placeholder) && (inputEl.dom.value === me.emptyText && me.valueContainsPlaceholder)) {
                me.setRawValue('');
                isEmpty = true;
                inputEl.removeCls(me.emptyCls);
                me.valueContainsPlaceholder = false;
            } else if (Ext.supports.Placeholder) {
                me.inputEl.removeCls(me.emptyCls);
            }
    
            if (me.selectOnFocus || isEmpty) {
                inputEl.dom.select();
                // see: http://code.google.com/p/chromium/issues/detail?id=4505
                //if (Ext.isWebKit) {
                //    if (!me.inputFocusTask) {
                //        me.inputFocusTask = new Ext.util.DelayedTask(me.focusInput, me);
                //    }
                //    me.inputFocusTask.delay(1);
                //} else {
                //    inputEl.dom.select();
                //}
            }
        }
    });
    Ext.NET - ASP.NET for Ext JS
    MVC and WebForms
    Examples | Twitter

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi