mardi 18 novembre 2014

Subsequent button actions not possible on single tap

Button actions are not being fired on single tap on a multi-panel screen. But on double tap the same is being fired.

The screen has multiple panels. Attaching the code below :



Code:



Ext.define('SenchaApp.view.Main', { extend:'Ext.Container',
xtype: 'main',
requires: ['SenchaApp.view.panel1','SenchaApp.view.panel2'],
config: {items: [{xtype : 'panel1'},
{xtype : 'panel2'},]}
});


Code:



Ext.define('SenchaApp.view.panel1',{
extend: 'Ext.form.Panel',
xtype: 'panel1',
config: {
title: 'panel1',
docked : 'left',
style : 'width: 5em; height: 5em;',
layout : 'vbox',
items: [{
xtype: 'button',
text: 'Display',
listeners: {
tap : function(){
alert('Display tapped');
Ext.ComponentQuery.query('#board')[0].setValue("Displayed");
}}},{ xtype: 'button',
text: 'Alert',
listeners: {
tap : function(){
alert('Alert');
}}
}]}
});


Code:



Ext.define('SenchaApp.view.panel2',{
extend:'Ext.Container',
alias:'panel2',
xtype: 'panel2',
requires : ['SenchaApp.view.panel3'],
config:{
style : 'height: 100%;',
layout:{
type:'card'
},
items : [{
xtype : 'panel3',
}]
}
});


Code:



Ext.define('SenchaApp.view.panel3',{
extend:'Ext.Panel',
alias:'panel3',
xtype: 'panel3',
requires : ['SenchaApp.view.custompanel'],
config:{
style : 'height: 100%;',
items : [{ xtype : 'textfield',
label : 'BOARD',
itemId : 'board'
},{
xtype : 'button',
text : 'SUBMIT',
itemId :'submit',
listeners: {
tap : function(){
alert('Submit');
}}
}]
}
});

Behavior : On clicking the 'Display' button, Display message is shown in the textbox. On single tapping the alert, no alert box is show. The same behavior is shown for 'submit' button.

Expected : On single tap of 'Alert' button, an alert should be shown.


Anyone faced any similar scenarios ? Please advise.






Subsequent button actions not possible on single tap

Aucun commentaire:

Enregistrer un commentaire