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
Posts: 20
Registered: ‎03-11-2011
My Device: Not Specified

Re: Make app not draggable

This one works for me.  The difference here is that the width value isn't hardcoded:

 

 

<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />

 

 

Regular Contributor
Posts: 60
Registered: ‎03-07-2011
My Device: Not Specified

Re: Make app not draggable

Hi All,

 

I tried putting:

 

<meta name="viewport" id="viewport" content="width=1024,height=600,initial-scale=1.0,user-scalable=no" />

 

in the head section of my index.html (and nowhere else) but it did not stop my app dragging around the screen.  Any more tips?

 

Thanks in advance.

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

Re: Make app not draggable

Even if your viewport is set.. if you have HTML content that is off the screen it will be scrollable.. and will allow the screen to be dragged.

 

Double check that you don't have any content in your application displaying outside of the screen dimensions.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Regular Contributor
Posts: 60
Registered: ‎03-07-2011
My Device: Not Specified

Re: Make app not draggable

Hi Tim,

 

Thanks very much for your reply.

 

I did what you suggested.  In addition to the <meta> information, I went and set all my full screen <div>s to the max screen size with margins=0.  Setting the sizes to the max (including the margins to zero) did not solve the problem by itself, but when I set overflow to hidden, that solved it.

 

In the end, I'm not sure why I needed the overflow:hidden, but it works so I'm not too concerned...I guess.

 

Thanks again for your response.

 

 

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

Re: Make app not draggable

You probably could have set its overflow to scroll as well.. just the main div boundaries itself cannot be outside of the main screen.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Highlighted
Developer
Posts: 57
Registered: ‎06-15-2011
My Device: PlayBook
My Carrier: Rogers

Re: Make app not draggable


tneil wrote:

Even if your viewport is set.. if you have HTML content that is off the screen it will be scrollable.. and will allow the screen to be dragged.

 

Double check that you don't have any content in your application displaying outside of the screen dimensions.



I actually just ran into this issue - the UI framework I use for Lemma for the BlackBerry PlayBook places screens to the right of the window to be "slid" in. I took a wild guess and updated the CSS for "upcoming" windows to be set to display: none and so far it looks like it's worked.