-
1 Mar 2011 3:27 AM #1
Tap delay on list items and erroneous firing of event for double tap (1.0.1a)
Tap delay on list items and erroneous firing of event for double tap (1.0.1a)
Hi,
I have a list in a panel that is configured as follows:
{
disableSelection: true,
itemTpl:
'<table class="library-item"><tr><td><img src="{icon}"/></td>' +
'<td>{title}</td></tr></table>',
onItemDisclosure: true,
store: libraries,
xtype: 'list',
listeners:
{
disclose: {fn: editLibrary},
itemtap: {fn: openLibrary}
}
}
When tapping an item or a disclosure button there is a long delay before the event actually fires. Doing a double tap fires it immediately, while it shouldn't fire at all. This indicates there may be something wrong with the double tap detection logic.
This happens on iPhone and iPad. In Safari on the desktop there is no such problem with click events.
Best regards,
Werner Donné.
-
2 Mar 2011 2:53 AM #2
The delay seems to occur when the contents of the main panel is changed like when switching cards in a card layout panel. If you just display an alert in the event handler then there is no delay.
When the delay occurs it is variable in duration.
-
3 Mar 2011 11:48 AM #3
I also experienced a long dealy/need to click more than once in a comparable situation.
I could "solve" it by adding a stupid timeout:
Worked for me.Code:onItemDisclosure: function (record, node, idx ) { setTimeout(function(){Ext.dispatch({controller:'myctrl',action:'myaction'}); },50); }
-
4 Mar 2011 12:11 AM #4
-
27 Jun 2011 2:17 PM #5
I'm also experiencing this issue. It happens when calling Ext.dispatch() from the tap event bound to a list item.
What is causing this delay?
-
27 Jun 2011 2:31 PM #6
I found the cause of the delay:
The "pressedDelay" config option for list components defaults to 100ms. Set it to 1 to avoid the delay.
Sencha Devs: This should really default to 0, it's counter-intuitive to add a delay by default.
So:
Code:var list = new Ext.List({ store: app.store.people, pressedDelay: 1, onItemTap: function (list, index, item, e) { var record = this.store.getAt(index); Ext.dispatch({ controller: app.controllers.people, action: 'detail', id: record.getId() }); } });
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
[OPEN-626] 1.0.1 Grouped Ext.List Issue When Adding Items When List Not Visible
By benwhite in forum Sencha Touch 1.x: BugsReplies: 0Last Post: 3 Dec 2010, 7:06 AM -
How to delay an Enter Key event [SOLVED]
By Sloger in forum Ext 3.x: Help & DiscussionReplies: 5Last Post: 5 Jun 2010, 6:57 AM -
Selection event of combobox items list
By onGoing in forum Ext 2.x: Help & DiscussionReplies: 6Last Post: 29 May 2009, 6:07 AM -
Delay on checkbox event
By doktoreas in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 10 Apr 2008, 8:56 AM -
Checkbox onClick event delay
By Rocketman in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 26 Jan 2008, 1:26 AM


Reply With Quote