PDA

View Full Version : Application crashes on textfield action event



raulMrello
5 Sep 2012, 5:24 AM
Hi, I'm developing a ST2/Phonegap application for android, and I've detected a wrong behaviour in a textfield item.

Once the panel is loaded and tapping the textfield, the virtual keyboard is shown. Some text is typed and (Go) is pressed. At that moment, the keyboard is hidden, a white screen is shown and the application is reset.

I've got several panels with textfields and this behaviour only occurs in one of them.

Here is the code:

Ext.define('AppOrus.view.New',{
extend: 'Ext.form.Panel',
xtype: 'newformpanel',
config: {
title: Messages.MTAB_New,
iconCls: 'compose',
fullscreen: true,
layout: 'vbox',
scrollable: {
direction: 'vertical',
directionLock: true
},
items:[
{
itemId: 'name',
xtype: 'textfield',
name : 'name',
label: 'Name',
labelWrap: true,
required: true,
},
{
itemId: 'phone',
xtype: 'textfield',
name : 'phone',
label: 'Phone',
labelWrap: true,
required: true,
},
{
itemId: 'passwd',
xtype: 'passwordfield',
name : 'passwd',
label: 'Password',
labelWrap: true,
required: true,
},
{
itemId: 'buttonbar',
xtype: 'toolbar',
docked: 'bottom',
items: [
{ xtype: 'spacer' },
{
itemId: 'save',
xtype: 'button',
action: 'saveNew',
iconCls: 'inbox2',
iconMask: true,
html: 'Save'
},
{ xtype: 'spacer' }]
}]
},
});

Also, I've captured its "action" event in a controller trying to disable event propagation like next code,

avoidEventPropagation: function(me, e, opts){
window.event.cancelBubble = true;
},
but it still produces a reset. The same occur in a HTC Desire HD and Samsung Galaxy ACE 2.

Anyone can help??

thanks .

mitchellsimoens
19 Sep 2012, 11:23 AM
I don't see why the action event would crash, Sencha Touch shouldn't be causing this.

alanthales
8 Mar 2013, 7:26 AM
Application aren't crashes, your form is being submited. You can confirm this, activating "adb logcat"...
I have same problem, still dont know a way to prevent the submit. =/

umr.ashrf
7 Apr 2013, 12:34 PM
It crashes for me too :) Seems more like refresh though.

staticbit
23 Apr 2014, 5:53 AM
I'm facing the same issue on both iOS and Android.

I have a Sencha Touch 2.3.1a / Cordova 3.4.1 project (using Sencha cmd 4.0.4.84).

The Keyboard has a "Go" button on textfields (and emailfields). Pressing the "Go" button refreshes the index.html page in the Cordova browser (thus giving the impression that the app crashed and restarted).

I am looking for a way to remove the "Go" button and replace it with a "Next" button like I see with the numberfields.

Has anyone been able to crack this?