PDA

View Full Version : [FIXED-141] Hyperlinks on activating card recieve click events from previous card



meyerovb
19 Jul 2010, 10:22 AM
Sencha Touch version tested:


0.9 rev 1



only default ext-all.css


Platform tested against:


iOS 4

Description:


On an iPhone tap events that change cards are carrying a click event over to the next card

Test Case:



Ext.setup({ onReady: function () {
var a = 'a'; for (var x = 0; x < 8; x++) a = a + ' ' + a;

window.panel = new Ext.Panel({ fullscreen: true, layout: 'card',
items: [{ xtype: 'panel',
items: [{ xtype: 'button', text: 'Passes Click Event', handler: function () { panel.setCard(1); } },
{ html: '<br/><a href="javascript:panel.setCard(1);">Not Passing Click Event</a>'}]
},
{ xtype: 'panel', html: '<a href="javascript:alert(1);">' + a + '</a>'}]
});
}
});

orangechicken
9 Aug 2010, 3:37 PM
This appears to be happening in 0.93 still. Additionally, it appears to be some race condition somewhere. If I delay creation of my clickable element by a few hundred milliseconds after the trigger event (350ms and the 'show' event, respectively, in my case) then the issue "goes away".

orangechicken
9 Aug 2010, 3:39 PM
Additionally, it's just hyperlinks. In my case, it's buttons in a floating, modal window that are receiving clicks from a tabbar when a particular tab is activated (the tab directly under the modal window).

aconran
9 Sep 2010, 1:38 PM
If I delay creation of my clickable element by a few hundred milliseconds after the trigger event (350ms and the 'show' event, respectively, in my case) then the issue "goes away".

We're looking into this. The current workaround is to delay the running of the code for around 400 ms like so:


handler: function () {
(function() {
panel.setCard(1);
).defer(400);
}

TommyMaintz
24 Sep 2010, 5:41 AM
This has been fixed and will be part of the next release.