Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25325] Windows: Click event of Button does not provide X, Y coordinates

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2017-10-30T23:21:19.000+0000
Affected Version/sRelease 6.2.0
Fix Version/sRelease 7.0.0, Release 6.3.0
ComponentsWindows
Labelsn/a
ReporterVictor Vazquez Montero
AssigneeKota Iguchi
Created2017-09-20T22:01:31.000+0000
Updated2017-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

FileDateSize
TestButtonClick.zip2017-09-20T22:01:14.000+00007837051
tiInfo (1).txt2017-09-20T22:00:59.000+00007686

Comments

  1. Kota Iguchi 2017-09-27

    https://github.com/appcelerator/titanium_mobile_windows/pull/1118
  2. Kota Iguchi 2017-09-27

    6_3_X: https://github.com/appcelerator/titanium_mobile_windows/pull/1123
  3. Ewan Harris 2017-10-09

    Verified in 6.3.0.v20171006185117 and 7.0.0.v20171009065347
  4. Victor Vazquez Montero 2017-10-20

    [~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.
  5. Kota Iguchi 2017-10-20

    [~vvazquezmontero] Yes. That's the platform component limitation, it always returns center coordinates of the button on Windows.
  6. Victor Vazquez Montero 2017-10-20

    Thank you Kota!
  7. Kota Iguchi 2017-10-23

    Reopening, it returns wrong Y-coordinate.
  8. Kota Iguchi 2017-10-23

    master: https://github.com/appcelerator/titanium_mobile_windows/pull/1149 6_3_X: https://github.com/appcelerator/titanium_mobile_windows/pull/1150
  9. Kota Iguchi 2017-10-26

    [CR & FR passed & merged for 6_3_X](https://github.com/appcelerator/titanium_mobile_windows/pull/1150).
  10. Victor Vazquez Montero 2017-11-06

    [~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.
  11. Kota Iguchi 2017-11-06

    [~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.
  12. Abir Mukherjee 2017-11-11

    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?
  13. Kota Iguchi 2017-11-11

    [~amukherjee] Yes, it should always return center coordinate of the button. For instance if button has width=100, height=50, it should always return x=50, y=25.
  14. Abir Mukherjee 2017-11-13

    [~kiguchi] should the ticket be reopened? It seems like it is still an issue.
  15. Kota Iguchi 2017-11-14

    [~amukherjee] Maybe Jenkins was failing to build it. Would you try 7.0.0.v20171113152835 ? I am getting 50, 25 for it.
  16. Abir Mukherjee 2017-11-14

    [~kiguchi] yes, it works. I'll close the ticket.

JSON Source