tabletwebview-url-fix

This commit is contained in:
Dante Ruiz 2017-05-03 23:05:05 +01:00
parent 4a8f5e380f
commit 5390a29859

View file

@ -16,7 +16,6 @@ Item {
property var parentStackItem: null
property int headerHeight: 70
property string url
property alias address: displayUrl.text //for compatibility
property string scriptURL
property alias eventBridge: eventBridgeWrapper.eventBridge
property bool keyboardEnabled: HMD.active
@ -82,6 +81,7 @@ Item {
color: hifi.colors.baseGray
font.pixelSize: 12
verticalAlignment: Text.AlignLeft
text: webview.url
anchors {
top: nav.bottom
horizontalCenter: parent.horizontalCenter;
@ -159,7 +159,6 @@ Item {
function loadUrl(url) {
webview.url = url
web.url = webview.url;
web.address = webview.url;
}
function onInitialPage(url) {
@ -253,7 +252,6 @@ Item {
});
webview.profile.httpUserAgent = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36";
web.address = url;
}
onFeaturePermissionRequested: {
@ -279,7 +277,6 @@ Item {
}
if (WebEngineView.LoadSucceededStatus == loadRequest.status) {
web.address = webview.url;
if (startingUp) {
web.initialPage = webview.url;
startingUp = false;
@ -307,7 +304,6 @@ Item {
Component.onCompleted: {
web.isDesktop = (typeof desktop !== "undefined");
address = url;
}
Keys.onPressed: {