The Webview content is not filling up the whole space so it can be used with 100% values. If you use px values it will work. If you inspect the element before this PR you'll see it doesn't have a height:
(it still renders the background color but the inner DOM elements can't handle % values).
After this PR it will fill up the whole webview (e.g. Ti.UI.FILL, nothing, or a number value) and the elements inside will respond to percentage values.
Test
var w = Ti.UI.createWindow({});
var h = Ti.UI.createWebView({
html: '<meta name="viewport" content="width=device-width, initial-scale=1"><body style="background-color:red"> <canvas style="width: 100%; height: 100%; background-color:blue"></canvas></body>'
});
w.add(h);
w.open();
Fixes #14098
The Webview content is not filling up the whole space so it can be used with
100%
values. If you use px values it will work. If you inspect the element before this PR you'll see it doesn't have a height:(it still renders the background color but the inner DOM elements can't handle % values).
After this PR it will fill up the whole webview (e.g. Ti.UI.FILL, nothing, or a number value) and the elements inside will respond to percentage values.
Test