Reputation: 91
I am working on an Ext JS project, we upgraded the sencha ext js from 6.0 to 7.2. Since this update, we are having some issues with Keyboard on Android devices.
The problem is when I have a text field focused (With Keyboard already closed) and then I click on some button, the keyboard is opened.
Steps:
PS.: Should mention that on the older version of sencha we don't have this problem. On this older version, the focus is kept on the field but when it is clicked on a button, the focus is removed and we don`t have the keyboard opened.
Thank you, Renato.
Upvotes: 0
Views: 228
Reputation: 4706
Found this bug in modern toolkit. The problem is in button, when you click on it it does not focused. The following override will help:
Ext.define('Overrides.Button', {
override: 'Ext.Button',
doTap: function(me, e) {
this.focus();
this.callParent(arguments);
}
});
Fiddle for reproduction: https://fiddle.sencha.com/#view/editor&fiddle/36rb Fiddle result to open on adroid device with soft keyboard: https://fiddle.sencha.com/fiddle/36rb/preview
You can also see the bug on desktop chrome version, just open the result field in browser, switch to mobile mode in dev tools (console). When you click on the button the focus does not move to button and stays on text field. I think that is the reason the soft keyboard is opening.
Upvotes: 1