Abhijit Muke
Abhijit Muke

Reputation: 1214

Tagfield selection focus issue in ExtJS 6

There is issue with emptyText in Tagfield focus in ExtJS 6..Setting emptyText will break something in the picker focus management and keep the picker from being dismissed when the tagfield looses focus.

is there any workaround for this pop up fix ?

Please find fiddle Glitch in tagfield when using emptyText config

Upvotes: 2

Views: 1492

Answers (1)

Monica Olejniczak
Monica Olejniczak

Reputation: 1156

I found that the problem persists even when the emptyText config is not set, indicating that this is a general issue with the focus of the picker. If you click on the text input, then click on the dropdown you can dismiss the picker. As a workaround, you can force the focus of the picker by listening to an expand event. The code below demonstrates this change:

{
    xtype: 'tagfield',
    fieldLabel: 'Select states',
    store: {
        type: 'states'
    },
    emptyText: 'Select...',
    displayField: 'state',
    valueField: 'abbr',
    filterPickList: true,
    queryMode: 'local',
    listeners: {
        expand: function (field) {
            field.getPicker().focus();
        }
    }
}

Upvotes: 3

Related Questions