Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Visitor
BoyanLazarov
Posts: 1
Registered: ‎10-05-2012
My Device: 9780, 9800
My Carrier: None

Incorrect mouse coordinates on touch event (9800)

Hello fellow developers,

 

I have really strange problem which breaks all html laws out there. I made an app for the dutch radio station FunX.

 

Here is a link to download and test the app: http://bbapp.tunin.fm/bb_jar/funx/test/FunX.jad

 

The problem that I face is a wrong detection of the mouse coordinates tested on BB 9800. 

 

Here is the problematic area:

FunX Menu

 

We have 6 buttons, 4 for screen navigation and 2 for changing the pages of the current screen (in this case the stations list).

 

This is how I dettect the click event: 

 

tfm.container.controls.delegate('a', tfm.clickEvent, function (e) {

var s = 'X=' + e.pageX + ' Y=' + e.pageY ;
alert(s);

....

}

 Now, the problem comes when I touch the area below the menu (the 5 purple pixels), especially to the left and right corners. Instead of doing nothing (because there is nothing just a background in this purple area) or because it is really small and it could detect it that I am pressing the button above (stations or information), what it really happens is that it throws a click event on the arrow buttons on the top.

 

That is why I put this alert to track the exact coordinates of the touch, because i decided i have made some kind of mistake with the divs and anchors size and positioning, but the test for me showed that whenever I touch this purple area in the bottom of the screen (directly below the arrow buttons), the alert tells me that I am pressing everytime exactly the same Y pixel which actually is on the top of the arrow buttons (e.g. the height of the screen is 480px, the purple area is 475-480px, I press there and the alert shows always Y=406px.

 

Have you met such a problem? Do you have any ideas why it accures? Could you advise me something? 

 

The workarrounds that I figure it out are to remove this purple area and to bind the menu to the bottom, or to put something invisible there to handles the false click events, but I am really interested in finding the nature of the problem.

 

Thank you,

Boyan Lazarov.

 

 

Please use plain text.