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
Developer
DueNorth
Posts: 135
Registered: ‎09-25-2012
My Device: Dev Alpha
Accepted Solution

BBUI.js fustrations

First off, good work to the developers helping out with the initiative. I am having a hard time using it though with the Dev Alpha device. It works great on Ripple,but has issues with the actual device.

 

I got everything coded up and tested fine on Ripple. Deployed it, and got the viewport bug with it where it looks super zoomed in, not too scale. I tried the "target-densitydpi" fix but it didn't work. So I tried the latest 0.9.4 branch, it fixed the view. The touch sensitivity went way down. It takes 2-3 hard taps to even move between screens.

 

Any tips here? The app worked fine on the Playbook, but switching from jQuery to BBUI seems to be tougher than I thought.

 

Developer
DueNorth
Posts: 135
Registered: ‎09-25-2012
My Device: Dev Alpha

Re: BBUI.js fustrations

OK... I was able to get better results by going back to BBUI-0.9.3 and removing the META tag for the ViewPort.

 

On the example on the GitHub site for tool kit initialization it has:

<script type="text/javascript" src="js/webworks-1.0.2.9.js"></script>

 

However on the BBUI sample applications, there is no reference to that line.

 

I took it that line out. It is much faster then before and looks right. However touch, still feels a bit off (will work 75% of the time). Need multiple taps to actually get it working.

BlackBerry Development Advisor
chadtatro
Posts: 620
Registered: ‎10-01-2009
My Device: Z10

Re: BBUI.js fustrations

[ Edited ]

Hi there,

 

If you want to use the current 0.9.3 version, then you could set your meta tag like this.  It's the preferred way of doing it for now.

 

<script>
   var meta = document.createElement("meta");
   meta.setAttribute('name','viewport');
   meta.setAttribute('content','initial-scale='+ (1/window.devicePixelRatio) + ',user-scalable=no');
   document.getElementsByTagName('head')[0].appendChild(meta);
</script>   

 

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Developer
DueNorth
Posts: 135
Registered: ‎09-25-2012
My Device: Dev Alpha

Re: BBUI.js fustrations

Thank you this also work.

Retired
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: BBUI.js fustrations

[ Edited ]

The onclick for the buttons/elements is a touch sensitivity issue wih the browser that we're still working on refining

 

v0.9.4 in the next branch handles all the meta tag stuff for you.. it should be getting pushed down into master soon

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter