Thank you for reporting this bug. We will make it our priority to review this report.
-
Touch Premium Member
[OPEN-765] IndexBar sometimes missing touchend event
I have an issue with an IndexBar attached to a List which sometimes wouldn't be reset on touchend. Consequently the next touch event wouldn't trigger a tap on the list, but on the IndexBar, even if I touch the screen far away from the IndexBar.
Unfortunately I haven't been able to come up with a sample code snippet causing it. The behaviour seems to depend on eg. the number of list items, or some action keeping the system busy. I'm mostly seeing it with some variety of a buffered list as described in this thread. This implementation very likely keeps the app pretty busy when jumping around, as it has to re-render the visible items. Could it be this is causing the touch events to be missed?
HTC Desire - Android: 2.2 - Kernel: 2.6.32.15-gf5a401c - Build: 2.29.405.2 - WebKit: 3.1
-
Touch Premium Member
The following change would at least ignore touches outside the IndexBar's box. It doesn't prevent "loss" of a touch even though:
Code:
Index: sencha-touch-debug.js
===================================================================
--- sencha-touch-debug.js (revision 8037)
+++ sencha-touch-debug.js (working copy)
@@ -23642,13 +23642,13 @@
}
if (this.vertical) {
- if (point.y > pageBox.bottom || point.y < pageBox.top) {
+ if (point.y > pageBox.bottom || point.y < pageBox.top || point.x < pageBox.left || point.x > pageBox.right) {
return;
}
target = Ext.Element.fromPoint(pageBox.left + (pageBox.width / 2), point.y);
}
else if (this.horizontal) {
- if (point.x > pageBox.right || point.x < pageBox.left) {
+ if (point.x > pageBox.right || point.x < pageBox.left || point.y < pageBox.top || point.y > pageBox.bottom) {
return;
}
target = Ext.Element.fromPoint(point.x, pageBox.top + (pageBox.height / 2));
What would be the correct way for me to use this new condition in my project, if I don't want to patch the sencha-touch.js file? I'm currently overriding the full method, but don't like copying full blocks of code for a single line change...
Michael
HTC Desire - Android: 2.2 - Kernel: 2.6.32.15-gf5a401c - Build: 2.29.405.2 - WebKit: 3.1