mirror of
https://github.com/overte-org/overte.git
synced 2025-08-11 03:28:48 +02:00
Merge pull request #10360 from ctrlaltdavid/21314
Fix reliability of keyboard enabling in tablet Web pages
This commit is contained in:
commit
9cee7ce483
1 changed files with 6 additions and 4 deletions
|
@ -18,7 +18,7 @@ Item {
|
||||||
property string url
|
property string url
|
||||||
property string scriptURL
|
property string scriptURL
|
||||||
property alias eventBridge: eventBridgeWrapper.eventBridge
|
property alias eventBridge: eventBridgeWrapper.eventBridge
|
||||||
property bool keyboardEnabled: HMD.active
|
property bool keyboardEnabled: false
|
||||||
property bool keyboardRaised: false
|
property bool keyboardRaised: false
|
||||||
property bool punctuationMode: false
|
property bool punctuationMode: false
|
||||||
property bool isDesktop: false
|
property bool isDesktop: false
|
||||||
|
@ -238,7 +238,7 @@ Item {
|
||||||
worldId: WebEngineScript.MainWorld
|
worldId: WebEngineScript.MainWorld
|
||||||
}
|
}
|
||||||
|
|
||||||
property string urlTag: "noDownload=false";
|
property string urlTag: "noDownload=false";
|
||||||
userScripts: [ createGlobalEventBridge, raiseAndLowerKeyboard, userScript ]
|
userScripts: [ createGlobalEventBridge, raiseAndLowerKeyboard, userScript ]
|
||||||
|
|
||||||
property string newUrl: ""
|
property string newUrl: ""
|
||||||
|
@ -264,7 +264,7 @@ Item {
|
||||||
keyboard.resetShiftMode(false);
|
keyboard.resetShiftMode(false);
|
||||||
// Required to support clicking on "hifi://" links
|
// Required to support clicking on "hifi://" links
|
||||||
if (WebEngineView.LoadStartedStatus == loadRequest.status) {
|
if (WebEngineView.LoadStartedStatus == loadRequest.status) {
|
||||||
var url = loadRequest.url.toString();
|
var url = loadRequest.url.toString();
|
||||||
if (urlHandler.canHandleUrl(url)) {
|
if (urlHandler.canHandleUrl(url)) {
|
||||||
if (urlHandler.handleUrl(url)) {
|
if (urlHandler.handleUrl(url)) {
|
||||||
root.stop();
|
root.stop();
|
||||||
|
@ -273,7 +273,7 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (WebEngineView.LoadFailedStatus == loadRequest.status) {
|
if (WebEngineView.LoadFailedStatus == loadRequest.status) {
|
||||||
console.log(" Tablet WebEngineView failed to laod url: " + loadRequest.url.toString());
|
console.log(" Tablet WebEngineView failed to load url: " + loadRequest.url.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (WebEngineView.LoadSucceededStatus == loadRequest.status) {
|
if (WebEngineView.LoadSucceededStatus == loadRequest.status) {
|
||||||
|
@ -281,6 +281,7 @@ Item {
|
||||||
web.initialPage = webview.url;
|
web.initialPage = webview.url;
|
||||||
startingUp = false;
|
startingUp = false;
|
||||||
}
|
}
|
||||||
|
webview.forceActiveFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -305,6 +306,7 @@ Item {
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
web.isDesktop = (typeof desktop !== "undefined");
|
web.isDesktop = (typeof desktop !== "undefined");
|
||||||
|
keyboardEnabled = HMD.active;
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onPressed: {
|
Keys.onPressed: {
|
||||||
|
|
Loading…
Reference in a new issue