Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    2
    Vote Rating
    0
    Ijansen is on a distinguished road

      0  

    Default Forms input element focus problem

    Forms input element focus problem


    Hi there,

    In forms that are build in Sencha Touch 2 we experience a problem with the focus on the input elements.

    When we set a focus on an input element the keyboard appears as expected. Except sometimes the keyboard shows go and sometimes next. When we touch outside the form the focus still stays within the input element. This behavior is not experienced on other websites.

    Device: Asus Eeepad
    Browser: Chrome
    Framework: Sencha Touch 2.0.0
    Android version: 4.0.3.

    the following code is used to generate the form:




    {
    xtype:"formpanel",
    id:"c6ec32f6-d8b0-5c99-4032-4678a9afc75c",
    items:[
    {
    xtype:"textfield",
    required:false,
    id:"ee6cc8b0-98e0-3614-939c-fce889673831",
    label:"Tekst"
    },
    {
    xtype:"button",
    id:"0e0cb636-8860-ff31-b4c6-5a0c7cfac58c",
    text:"test1"
    }
    ]

    Has anyone experienced this problem and a solution for this?

    Thanks in advance!

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,710
    Vote Rating
    436
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    When you say you set focus do you mean field.focus() or by tapping on the field?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Jun 2012
    Posts
    2
    Vote Rating
    0
    Ijansen is on a distinguished road

      0  

    Default


    Hi Mitchell,

    Thanks for your reply. When i said set the focus i meant tapping on the field.


  4. #4
    Sencha User mcamara's Avatar
    Join Date
    Feb 2008
    Posts
    7
    Vote Rating
    0
    mcamara is on a distinguished road

      0  

    Default


    Hi,

    It happens for me too. I don't have any events that fires focus action on any field of the form.

    Just when I display the form, the focus automatically fires on the emailfield (one before last field), the form scroll down automatically, and the keyboard appear. It's annoying.

    Any ideas?

    Code:
    		...
    		defaults: {
    			required: true
    		},
    
    		items: [
    			{
    		        	xtype: 'toolbar',
    		        	docked: 'top',
    		        	title: '<img src="resources/images/toolbar/icon.png" width="40" height="40" />',
    		        	items: [
    		        		{
    				              xtype: 'image',
    						width: 42,
    						height: 40,
    						src: 'resources/images/toolbar/buttonback.png',
    						action: 'backToMain'
    					}
    				]
    			},
    			{
    				xtype: 'panel',
    				layout: { type: 'vbox', align: 'center' },
    				items: [
    					{
    						xtype: 'image',
    						align: 'center',
    						width: 127, height: 25,
    						src: 'resources/images/register/logindata.png',
    						style: 'margin-bottom: 0.25em'
    					}
    				]
    			},
    			{
    				xtype: 'fieldset',
    				items: [
    					{
    						xtype: 'textfield',
    						placeHolder: 'Username',
    						fieldStyle:'text-transform:uppercase',
    						name: 'login'
    					},
    					{
    						xtype: 'passwordfield',
    						placeHolder: 'Password',
    						name: 'password'
    					}
    				]
    			},{
    				xtype: 'panel',
    				layout: { type: 'vbox', align: 'center' },
    				items: [
    					{
    						xtype: 'image',
    						align: 'center',
    						width: 127, height: 25,
    						src: 'resources/images/register/usertype.png',
    						style: 'margin-bottom: 0.25em'
    					}
    				]
    			},{
    				xtype: 'panel',		// fieldset
    				style: 'margin-bottom: 1em',
    				layout: {
    	                type  : 'hbox',
    	                align : 'stretch'
    	            },
    				defaults: { flex: 1, labelAlign: 'right', labelWidth: '60%' },
    				items: [
    					{
    						xtype: 'radiofield',
    			            name : 'type_id',
    			            value: SIF.util.Config.define.USER.TYPE.USER,
    			            label: 'User',
    			            checked: true
    					},
    					{
    						xtype: 'radiofield',
    			            name : 'type_id',
    			            value: SIF.util.Config.define.USER.TYPE.PROVIDER,
    			            label: 'Brand'
    					}
    				]
    			},{
    				xtype: 'panel',
    				layout: { type: 'vbox', align: 'center' },
    				items: [
    					{
    						xtype: 'image',
    						align: 'center',
    						width: 159, height: 25,
    						src: 'resources/images/register/personaldata.png',
    						style: 'margin-bottom: 0.25em'
    					}
    				]
    			},{
    				xtype: 'fieldset',
    				items: [
    					{
    						xtype: 'textfield',
    						placeHolder: 'Name',
    						name: 'name'
    					},
    					{
    						xtype: 'textfield',
    						placeHolder: 'Surname',
    						name: 'lastname'
    					},
    					{
    	                    xtype: 'emailfield',
    	                    placeHolder: 'Email',
    	                    name: 'email'
    	                },
    					{
    						xtype: 'datepickerfield',
    						placeHolder: 'Born',
    						name: 'birth',
    						picker: {
    							yearFrom: 1950,
    					        yearTo: Number(Ext.Date.format(Ext.Date.add(new Date(), Ext.Date.YEAR, -(SIF.util.Config.define.USER_MUSTBE_OVER_YEARS)), 'Y'))
    					    }
    					}
    				]
    			},{
    				xtype: 'button',
    				text: 'Resgistrar',
    				ui: 'decline',
    				action: 'submitLogin',
    				iconCls: 'action', iconMask: true,
    				height: 40
    			}
    		]