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
Contributor
appcannon
Posts: 40
Registered: ‎11-11-2012
My Device: Developer

Moving div with JS causes flashing with BB10 Simulator

I'm building an app in which a div (or any element, really) can be slid around on screen using ontouchdown and ontouchup events on that object.  While moving that element with a touch, the screen or varrious other elements flash sporadically.  The flashing does not occur when the div is animating through other means, however.

 

Is this a simulator issue, or is it actually present in the app?

Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 620
Registered: ‎10-01-2009
My Device: Z10

Re: Moving div with JS causes flashing with BB10 Simulator

Hello,  

 

Could you provide some sample code to test with? http://jsfiddle.net/

 

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.
Contributor
appcannon
Posts: 40
Registered: ‎11-11-2012
My Device: Developer

Re: Moving div with JS causes flashing with BB10 Simulator

I'm fairly certain this will reproduce the problem.

 

Using the Pong jQuery function from here.

 

http://jsfiddle.net/ecVpJ/

Please use plain text.
Contributor
appcannon
Posts: 40
Registered: ‎11-11-2012
My Device: Developer

Re: Moving div with JS causes flashing with BB10 Simulator

Also, is the click event supported, or do I have to use touch events?  The reason I ask is because the simulator uses a cursor, so I don't know if it's emulating a normal click or a touch click.

Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 620
Registered: ‎10-01-2009
My Device: Z10

Re: Moving div with JS causes flashing with BB10 Simulator

Click events do work, I use them regularly.

 

I'll test of the sample on my Dev Alpha and report back today for you.

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.
Contributor
appcannon
Posts: 40
Registered: ‎11-11-2012
My Device: Developer

Re: Moving div with JS causes flashing with BB10 Simulator

Thank you sir/ma'am.

 

When you test it on device, it's the right ping pong paddle that is dragable.

Please use plain text.