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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
Visitor
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.