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
New Contributor
Posts: 8
Registered: ‎11-07-2011
My Device: BlackBerry Z10
My Carrier: None

Javascript onmousemove doesn't fire when mouse pointer at bottom of screen using trackball

Hi,

 

I'm trying to detect when the trackball is used. However, the onmousemove event does not fire when the mouse pointer is at the bottom of the screen (I guess this is because the mouse is not moving at this point). However, does anyone know what event I can listen to detect trackball events (even when mouse pointer is at window boundary)?

 

Here is a snippet of code that demonstrates the problem. Try to position the mouse at the bottom of the screen before loading it as it will display a lot of alert boxes as you move the mouse down the page.

  

 

<!DOCTYPE HTML>
<html>
<body onmousemove="alert('moving...');">
1<br/>
2<br/>
3<br/>
4<br/>
5<br/>
6<br/>
7<br/>
8<br/>
9<br/>
10<br/>
11<br/>
12<br/>
13<br/>
14<br/>
15<br/>
</body>
</html>

 

PS To make it easier to debug you may want to use the following asynchronous alert box (compliments of http://javascript.nwbox.com/asyncAlert/). Just add it between the html and body tags.

 

<head>
    <style type="text/css">
    .notifier {	z-index: 100;	margin: 0px 0px;	padding: 8px 8px;	border: 1px solid #f00;	background-color: #fc0;}
    </style>
    <script type="text/javascript" src="http://javascript.nwbox.com/asyncAlert/async_alerts.js"></script>
</head>

 

New Contributor
Posts: 8
Registered: ‎11-07-2011
My Device: BlackBerry Z10
My Carrier: None

Re: Javascript onmousemove doesn't fire when mouse pointer at bottom of screen using trackball

*Bump*
Developer
Posts: 289
Registered: ‎10-17-2008
My Device: Torch 9800
My Carrier: Rogers

Re: Javascript onmousemove doesn't fire when mouse pointer at bottom of screen using trackball

Hi philipjmurphy,

Have you considered using focus-based navigation?

https://bdsc.webapps.blackberry.com/html5/apis/blackberry.focus.html

Cheers,
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
New Contributor
Posts: 8
Registered: ‎11-07-2011
My Device: BlackBerry Z10
My Carrier: None

Re: Javascript onmousemove doesn't fire when mouse pointer at bottom of screen using trackball

Hi,

 

Thanks for the suggestion. I can't use focus navigation as I am actually trying to simulate scrolling on a Sencha Touch web page, which I would be able to do if the trackball fired any events after the mouse reached the bottom of the page. It's surprising that the trackball does not let the web page know that the user is using it.

 

So, I still need a solution for this one.

 

Thanks,

 

Philip