[TIMOB-25325] Windows: Click event of Button does not provide X, Y coordinates
GitHub Issue | n/a |
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-10-30T23:21:19.000+0000 |
Affected Version/s | Release 6.2.0 |
Fix Version/s | Release 7.0.0, Release 6.3.0 |
Components | Windows |
Labels | n/a |
Reporter | Victor Vazquez Montero |
Assignee | Kota Iguchi |
Created | 2017-09-20T22:01:31.000+0000 |
Updated | 2017-11-14T01:04:34.000+0000 |
Description
Description
When Click event is fired on Ti.UI.Button, the obejct in the event parameter is not provided x,y coordinates of the click location
Steps to reproduce
Run attached Alloy project
Click on the test button
Log statement in index.js for the click event of button to print x, y coordingates will print NaN instea of the actual click coordinates
additional information
Attached environment details:
[^tiInfo (1).txt]
attached test app:
[^TestButtonClick.zip]
Attachments
https://github.com/appcelerator/titanium_mobile_windows/pull/1118
6_3_X: https://github.com/appcelerator/titanium_mobile_windows/pull/1123
Verified in 6.3.0.v20171006185117 and 7.0.0.v20171009065347
[~kiguchi] We just tested this fix out and it does send back coordinates but it only sends x=150, y=150 no matter where you click.
[~vvazquezmontero] Yes. That's the platform component limitation, it always returns center coordinates of the button on Windows.
Thank you Kota!
Reopening, it returns wrong Y-coordinate.
master: https://github.com/appcelerator/titanium_mobile_windows/pull/1149 6_3_X: https://github.com/appcelerator/titanium_mobile_windows/pull/1150
[CR & FR passed & merged for 6_3_X](https://github.com/appcelerator/titanium_mobile_windows/pull/1150).
[~kiguchi] Hello Kota, User has tested with SDK and X, Y coordinates still dont provide center of the button when using different width and height. I've confirmed this on my own.
[~vvazquezmontero] It is merged to 6_3_X but it is not included in 6.3.0. We are going to push it to our nightly server builds [6.3.1](http://builds.appcelerator.com/#6_3_X) but since we expect 7.0.0 RC pretty soon (I guess), it might be available as of 7.0.0.
PR merged. [~kiguchi], with SDK 7.0.0.v20171110104246, When pushing the button, it seems like I'm getting X,Y coordinates within the button. Based on expected results, it's supposed to return the exact same X,Y value representing the center of the button. Is it expected to return different X,Y value pairs each time I hit the button?
[~amukherjee] Yes, it should always return center coordinate of the button. For instance if button has
width=100, height=50
, it should always returnx=50, y=25
.[~kiguchi] should the ticket be reopened? It seems like it is still an issue.
[~amukherjee] Maybe Jenkins was failing to build it. Would you try
7.0.0.v20171113152835
? I am getting50, 25
for it.[~kiguchi] yes, it works. I'll close the ticket.