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
Contributor
Posts: 29
Registered: ‎09-05-2012
My Device: BlackBerry Q10 Z10
My Carrier: China Mobile

onclick event can not be triggered if float:left or float:right used in div

[ Edited ]

Dear All,

 

I found an issue that 

 

onclick event can not be triggered if float:left or float:right used in div, in the simulator, while at the same time the same code works fine in ripple.

 

I am not sure whether it works fine in the actual machine,

 

Here are the demo code

 

<div id="d1" style="float:left;width:35%" onclick="document.getElementById('d1').style.width='22%';"></div>

<div id="d2" style="float:left;width:65%" onclick="document.getElementById('d2').style.width='78%';"></div>

 

the onclick was triggered and works fine, in ripple, but does not work on simulator, 

 

Here are the version information:

 

WebWorks SDK: Gold

Simulator: 10.0.09.1101

Ripple: V0.9.10 Beta

 

Hope someone could help on this issue.

 

Appreciate for any valuable information.

 

 

Highlighted
BlackBerry Development Advisor
Posts: 769
Registered: ‎10-01-2009
My Device: All
My Carrier: N/A

Re: onclick event can not be triggered if float:left or float:right used in div

Have you downloaded the latest simulator?  Looks like you're running the old version.

 

Simulator: 10.0.09.1101

 

New one should be: 10.0.09.1673

Contributor
Posts: 29
Registered: ‎09-05-2012
My Device: BlackBerry Q10 Z10
My Carrier: China Mobile

Re: onclick event can not be triggered if float:left or float:right used in div

Dear Chadtatro,

 

Thanks for your reply, I have updated the simulator to the latest version , but this issue remains the same,

 

I got the information that float attribute of css is supported, from official webworks document.

 

But seems even the layout is working fine, the javascript event was not triggered.

 

I have update my code to use absolute position to avoid this issue and the work around works fine, except that I have to write slightly  a little more javascript code.

 

I think that might be an issue in the simulator, not sure whether it works on the develop alpha and beta machine, could you please help to write a test case and test whether it works or not?

 

Would like to appreicate for your great help on this.

 

Best regards.

Lawrence.

BlackBerry Development Advisor
Posts: 769
Registered: ‎10-01-2009
My Device: All
My Carrier: N/A

Re: onclick event can not be triggered if float:left or float:right used in div

It's definitely working on the dev alpha.