CB-7692 InAppBrowser local url opening bug in 8.1
Using ms-appx-web instead of ms-appx
This commit is contained in:
parent
1bf42c9e3b
commit
d2eaa089f8
@ -88,7 +88,10 @@ var IAB = {
|
|||||||
if (target === "_system") {
|
if (target === "_system") {
|
||||||
url = new Windows.Foundation.Uri(strUrl);
|
url = new Windows.Foundation.Uri(strUrl);
|
||||||
Windows.System.Launcher.launchUriAsync(url);
|
Windows.System.Launcher.launchUriAsync(url);
|
||||||
} else if (target === "_blank") {
|
} else if (target === "_self" || !target) {
|
||||||
|
window.location = strUrl;
|
||||||
|
} else {
|
||||||
|
// "_blank" or anything else
|
||||||
if (!browserWrap) {
|
if (!browserWrap) {
|
||||||
browserWrap = document.createElement("div");
|
browserWrap = document.createElement("div");
|
||||||
browserWrap.style.position = "absolute";
|
browserWrap.style.position = "absolute";
|
||||||
@ -115,15 +118,16 @@ var IAB = {
|
|||||||
popup.style.borderWidth = "0px";
|
popup.style.borderWidth = "0px";
|
||||||
popup.style.width = "100%";
|
popup.style.width = "100%";
|
||||||
popup.style.height = "100%";
|
popup.style.height = "100%";
|
||||||
|
|
||||||
|
if (isWebViewAvailable) {
|
||||||
|
strUrl = strUrl.replace("ms-appx://", "ms-appx-web://");
|
||||||
|
}
|
||||||
popup.src = strUrl;
|
popup.src = strUrl;
|
||||||
|
|
||||||
// start listening for navigation events
|
// start listening for navigation events
|
||||||
attachNavigationEvents(popup, win);
|
attachNavigationEvents(popup, win);
|
||||||
|
|
||||||
browserWrap.appendChild(popup);
|
browserWrap.appendChild(popup);
|
||||||
|
|
||||||
} else {
|
|
||||||
window.location = strUrl;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user