You found a bug! We've classified it as EXTJSIV-5379 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Ext JS Premium Member sumit.madan's Avatar
    Join Date
    May 2009
    Location
    Bangalore, India
    Posts
    116
    Vote Rating
    7
    sumit.madan will become famous soon enough

      0  

    Default [4.1b2] Tooltip steals focus when hidden

    [4.1b2] Tooltip steals focus when hidden


    Test case in post below

    If a text field has focus and a tooltip is shown (anywhere in the application). When the tootip is hidden (either by using hide() or if the tooltip display timeout expires), the focus is no longer on the text field and is lost.

    This becomes an irritating issue when forms have tooltip on items and also contain text fields. As soon as any tooltip gets shown and is then hidden, user no longer has focus on the text field he was editing.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,599
    Vote Rating
    435
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    What browser are you seeing this on? I opened the Dynamic form example and focused on the first text field which has allowBlank : false. I then tab to the next one and the error icon shows in the first text field. Focus being on the 2nd field, I mouse over the error icon which produces a tip but the 2nd field still has focus.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Ext JS Premium Member sumit.madan's Avatar
    Join Date
    May 2009
    Location
    Bangalore, India
    Posts
    116
    Vote Rating
    7
    sumit.madan will become famous soon enough

      1  

    Default


    A little investigation revealed that it happens when tooltip is in a modal window. Run the example below and type something in the text box, then hover mouse over checkbox which shows the tooltip. Move mouse away from checkbox, as soon as the tooltip is hidden, the focus is lost.

    Code:
    Ext.define('UI.form.LoginDialog', {
        extend: 'Ext.window.Window',
        requires: ['Ext.layout.container.Border', 'Ext.form.Panel', 'Ext.form.field.Checkbox'],
        alias: 'widget.logindialog',
    
        width: 420,
        height: 130,
        title: 'Login',
        modal: true,
    
        formPanel: undefined,
    
        initComponent: function() {
            var config = {};
            Ext.applyIf(this, Ext.apply(this.initialConfig, config));
    
            this.usernameField = {
                xtype: 'textfield',
                name: 'data[User][username]',
                fieldLabel: 'Username',
                validateOnBlur: false,
                allowBlank: false
            };
    
            this.passwordField = this.passwordField || {};
            this.passwordField = {
                xtype: 'textfield',
                inputType: 'password',
                name: 'data[User][password]',
                fieldLabel: 'Password'
            };
    
            this.rememberMeField = this.rememberMeField || {};
            this.rememberMeField = Ext.Object.merge({
                xtype: 'checkbox',
                itemId: 'rememberMe',
                name: 'data[User][rememberme]',
                padding: '0 0 0 80',
                boxLabel: 'Remember me on this computer',
                listeners: {
                    render: function(checkbox) {
                        checkbox.bodyEl.child('input').set({
                            'data-qtip': 'This is not recommended for shared computers.'
                        });
                    },
                    scope: this
                }
            }, this.rememberMeField);
    
            this.formPanel = this.formPanel || {};
            this.formPanel = Ext.create('Ext.form.Panel', Ext.Object.merge({
                bodyPadding: 10,
                header: false,
                region: 'center',
                border: false,
                waitMsgTarget: true,
                layout: {
                    type: 'vbox',
                    align: 'stretch'
                },
                defaults: {
                    labelWidth: 75
                },
                items: [
                    this.usernameField,
                    this.passwordField,
                    this.rememberMeField
                ]
            }, this.formPanel));
    
            this.items = [this.formPanel];
    
            this.callParent(arguments);
        }
    });
    
    Ext.require('UI.form.LoginDialog');
    
    Ext.onReady(function() {
        Ext.tip.QuickTipManager.init();
        
        var loginDialog = Ext.create('UI.form.LoginDialog', {});
    
        loginDialog.show();
    });

  4. #4
    Ext JS Premium Member sumit.madan's Avatar
    Join Date
    May 2009
    Location
    Bangalore, India
    Posts
    116
    Vote Rating
    7
    sumit.madan will become famous soon enough

      0  

    Default


    bump

  5. #5
    Ext JS Premium Member sumit.madan's Avatar
    Join Date
    May 2009
    Location
    Bangalore, India
    Posts
    116
    Vote Rating
    7
    sumit.madan will become famous soon enough

      0  

    Default


    Any chance a fix can come in 4.1.1?

  6. #6
    Sencha Premium Member sonata82's Avatar
    Join Date
    Aug 2011
    Posts
    11
    Vote Rating
    2
    sonata82 is on a distinguished road

      0  

    Default


    Fixing this issue seems to be on the road map for 4.2.

  7. #7
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,458
    Vote Rating
    20
    Animal is a jewel in the rough Animal is a jewel in the rough Animal is a jewel in the rough

      0  

    Default


    I think this was EXTJSIV-5450 which was fixed in 4.1.3