-
10 Nov 2011 2:06 PM #1
[PR1] Moving from a textfield to a selectfield does not hide the keyboard
[PR1] Moving from a textfield to a selectfield does not hide the keyboard
REQUIRED INFORMATION
Version:- Sencha Touch 2.0 PR1
- Android 2.3
- iPhone 3GS 4.3.5 Safari
- <!DOCTYPE html>
- When you go from a textfield to a selectfield, the keyboard should be hidden. Instead, the keyboard remains on the screen, covering up the picker.
Code:Ext.setup({ onReady: function() { Ext.Viewport.add(Ext.create('Ext.form.Panel', { items: [ { xtype:'fieldset', title:'wut', items:[ { xtype: 'textfield', label: 'textfield' }, { xtype:'selectfield', label: 'selectfield' } ] } ] })); } });
-
11 Nov 2011 8:54 AM #2Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,652
- Vote Rating
- 14
Thank you for the report.
-
29 Nov 2011 6:53 PM #3
PR2
PR2
Additional note: The text field that originally had focus appears to still have focus. Sometimes it appears on top of the mask when the picker sheet is visible.
I need to bump this by saying that this bug still exists in PR2 and makes Android forms with select fields virtually unusable. Does anyone have a workaround?
A better example of this:
Code:Ext.define('SelectModel', { extend: 'Ext.data.Model', fields: [ { name:'V', type:'int' }, { name:'D', type:'string' } ]}); Ext.setup({ onReady: function() { Ext.Viewport.add(Ext.create('Ext.form.Panel', { items: [ { xtype:'fieldset', title:'wut', items:[ { xtype: 'textfield', label: 'textfield' }, Ext.create('Ext.form.Select', { name: 'Select', valueField:'V', displayField:'D', label: 'Select (incorrect)', store: Ext.create('Ext.data.JsonStore', { model: 'SelectModel', data: [ {V: 0, D: 'Selection_0'}, {V: 1, D: 'Selection_1'}, {V: 2, D: 'Selection_2'} ] }) }) ] } ] })); } });
-
1 Dec 2011 3:37 PM #4
So, in the next release I have added Ext.hideKeyboard, and this will be called when you show a select field popup/picker. This should fix your issue.
Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
-
1 Dec 2011 3:45 PM #5
That's fantastic! I've been hoping for a way to hide the keyboard. In fact, I couldn't figure out how to reliably do this with just JavaScript (without interfacing with a native call). I look forward to reading that code when PR3 or Beta is out.
However, I'm not sure this solves all of the problems. One of the weird things happening on Android is that the original text field is sometimes still blinking with focus under the mask. Sometimes a stray click brings that text field input above the mask. Sometimes a different stray click brings the masked input of the select field to focus above the mask and above the picker. I've got my fingers crossed that your fix solves these problems as well. I will test it when your fix is out.
-
1 Dec 2011 3:50 PM #6
Well, when you call hideKeyboard, it actually removes the focus from the current field too, so the cursor has been removed.
Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
-
1 Dec 2011 3:53 PM #7
-
22 Oct 2012 12:39 AM #8
I work with sencha touch 2.0.1.1 and i can to say it is fixed. If i go on Android from textfield to selectfield the keyboard is not hidden.
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-1021
in
2.0.


Reply With Quote