Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-1321
in
a recent build.
-
Sencha User
Event Dispatcher bug? in android
Hi all,
I'm testing touchevent example of Kitchensink in Sencha Touch 2 pr2,
in Android the orientation a.pageX, a.pageY are zero.
but in iphone they are non zero.
Is it a bug? How can I get the touched orientation?
Code:
eventDispatcher.addListener('element', '#touchpad', '*', function(a,b,c,d) {
var name = d.info.eventName;
if (!name.match("mouse") && !name.match("click")) {
var logger = Ext.getCmp('logger'),
scroller = logger.getScrollable().getScroller();
logger.innerHtmlElement.createChild({
html: d.info.eventName + '[' + a.pageX + ',' + a.pageY + ']'
});
setTimeout(function() {
scroller.scrollTo(0, scroller.getSize().y - scroller.getContainerSize().y);
}, 50);
}
});
-
Thank you for trying to wrap your code but use the CODE tags not QUOTE.
Can you give me a local test case to run to reproduce?
-
Sencha User
REQUIRED INFORMATION
Ext version tested:
Browser versions tested against:
- ____
- Mobile Safari 5 (iOS5)
- Mobile Safari 4 (Android 2.3.3, Galaxy TAB )
DOCTYPE tested against:
Description:
- In touchevent example of Kitchensink,
- The coordinates info about 'tap' events weren't obtained on Android device.
Steps to reproduce the problem:
- Excute Kitchensink example
- select Touch Event menu
- tap 'Touch Here !' panel
- check event log
The result that was expected:
- coordnates values of 'touchstart' event in Android.
The result that occurs instead:
- coordnates values of 'touchstart' event in Android are [0,0].
Test Case:
- Modify the function 'initialize()' in TouchEvents.js
- In this test, the code colored in red added to 'all-classes.js' file.
Code:
eventDispatcher.addListener('element', '#touchpad', '*', function(a,b,c,d) {
var name = d.info.eventName;
if (!name.match("mouse") && !name.match("click")) {
var logger = Ext.getCmp('logger'),
scroller = logger.getScrollable().getScroller();
logger.innerHtmlElement.createChild({
html: d.info.eventName + '[' + a.pageX + ',' + a.pageY + ']'
});
setTimeout(function() {
scroller.scrollTo(0, scroller.getSize().y - scroller.getContainerSize().y);
}, 50);
}
});
HELPFUL INFORMATION
Screenshot or Video:
See this URL for live test case: http://redballoon.kr/sencha2/examples/kitchensink
Debugging already done:
Possible fix:
Additional CSS used:
- only default ext-all.css
- custom css (include details)
Operating System:
-
This has been fixed for the next release. As a temporary workaround, you can use a.touch.point.x and a.touch.point.y which will provide you with accurate positions.