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

Native Development

Reply
Developer
Innovatology
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

WebView sizing issue?!

[ Edited ]

WebView seems to size differently on Z10 vs DAC.

 

QML:

 

import bb.cascades 1.0

Page {
    Container {
        layout: DockLayout {}
        WebView {
            html: "<html><body><h1>Hello, world!</h1></body></html>"
            horizontalAlignment: HorizontalAlignment.Fill
            verticalAlignment: VerticalAlignment.Fill
        }
    }
}

 

Z10 LE STL100-1 running 10.0.10.738, correctly fills the entire screen:

 

Z10 

 

Dev Alpha C running 10.1.0.1483, incorrectly sizes WebView to content:

 

Dev Alpha C

 

Note: I have scaled both screenshots to 50% and added a red border to emphesize the difference.

 

Adding settings.zoomToFitEnabled: false makes no difference.

 

Tested with various SDK versions: 10.0.10.738 - 10.1.0.1020 - 10.1.0.1438, all with the same result.

 

Am I overlooking something blatantly obvious?

 

 

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Please use plain text.
Developer
Innovatology
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: WebView sizing issue?!

Workaround:

 

WebView {
    ...
    preferredWidth: Infinity
    preferredHeight: Infinity
}

 

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Please use plain text.
Developer
Innovatology
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: WebView sizing issue?!

Bug tracker entry: https://www.blackberry.com/jira/browse/BBTEN-1247

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Please use plain text.