-
6 Oct 2012 10:42 AM #1
Unanswered: Why does a textfield gain focus without tapping?
Unanswered: Why does a textfield gain focus without tapping?
I've noted that when I navigate to some of my form panel views, they automatically gain focus in a text field. Other form views that I navigate to don't.
That happens despite all my views being based on almost identical code as below.
This happens on the iOS simulator and makes the keyboard pop up although no text field was tapped.
Any ideas how to prevent this erratic behavior?
Code:Ext.define('MyApp.view.TextView', { extend: 'Ext.navigation.View', requires: ['Ext.form.Panel', 'Ext.form.FieldSet'], xtype: 'text', config: { navigationBar: { items: [ { xtype: 'button', iconMask: true, text: 'Post Stuff', align: 'right', action: 'postStuffButton' }, { xtype: 'button', iconMask: true, text: 'Close', align: 'left', action: 'closeButton' } ] }, items: [ { title: 'MyApp', xtype: 'formpanel', items: [ { styleHtmlContent: true, html : '', }, { xtype: 'fieldset', items: [{ xtype: 'textfield', name: 'message', placeHolder: 'Your text message' },{ xtype: 'textfield', name: 'tags', placeHolder: 'Up to 5 tags' }] }, { xtype: 'button', text: 'Post', ui: 'confirm' } ] } ] }, });
-
7 Oct 2012 7:10 AM #2Sencha - Sales Team
- Join Date
- Mar 2007
- Location
- Melbourne, Australia (aka GMT+10)
- Posts
- 738
- Vote Rating
- 6
- Answers
- 10
does it happen on an ios device, or just in the simulator?
Check out SenchaWorld.com for articles, screencasts, conference videos and more.
Sencha Technical Training : Asia Pacific Region
Code Validation : JSLint | JSONLint | JSONPLint
-
7 Oct 2012 1:24 PM #3
just in the iOS simulator (v6) -- I haven't provisioned yet to run on a device -- have you seen this issue in your apps?
-
8 Oct 2012 4:21 AM #4
I have a similar problem, see http://www.sencha.com/forum/showthre...intended-focus.
Is there an element from for example an overlapping view which is clicked first, and is located at the same position?
-
9 Oct 2012 3:46 PM #5
not really - it just focuses as soon as the view is loaded


Reply With Quote


