PDA

View Full Version : Combobox Boxselect.js loses focus when used with typeahead ExtJS4.2.3



kvchitnis
4 Nov 2014, 11:50 AM
According to the example given at http://kveeiv.github.io/extjs-boxselect/examples/boxselect.html, using boxselect, one can have multiselect as well as typeahead (if turned on). I had to modify the code but even then, the combobox loses focus intermittently when typeahead is used with mutliselect->

Ext.define('Test.MultiSelectComboBox', {
extend: 'Test.Extensions.BoxSelect',
padding: '10 10 10 10',
anchor: '100%',
queryMode: 'local',
valueField: 'key',
displayField: 'value',
triggerAction: 'all',
editable: true,
typeahead: true,
listeners: {
specialkey: function(field, e){
field.focus();
}
}
});

slemmon
6 Nov 2014, 5:28 PM
The user extension is outside the scope of Sencha support. You may need to reach out to the original author directly.

ExtJS 5.x introduces the tagfield (http://docs.sencha.com/extjs/5.0/apidocs/#!/api/Ext.form.field.Tag), but is not planned for 4.x
http://dev.sencha.com/ext/5.0.1/examples/kitchensink/#form-tag

lautin
26 Mar 2018, 1:26 AM
I could solve the similar issue with focus be two actions:


Set "selectOnFocus: false"


Update doRawQuery.
doRawQuery: function() {
var me = this;
...
me.inputEl.focus();
}


If you have your overridden version (I believe you should to not change original plugin), you can do it this way to not duplicate the logic:
doRawQuery: function() {
var me = this;
me.callParent(arguments);
me.inputEl.focus();
}