Skip to content

Commit

Permalink
Merge pull request #63 from pierrekamel5/master
Browse files Browse the repository at this point in the history
show webview in same page in pwa if it is in a popup window
  • Loading branch information
nteske authored Sep 19, 2022
2 parents 481b67c + 5e6d0db commit 2a52d42
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions src/widget/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,14 @@ const render = (content) => {
if(openWindow){
setTimeout(() => buildfire.navigation.goBack(), 750);

if(content.view === viewOptions.POPUP)
buildfire.navigation.openWindow(content.url, "_blank");
if(content.view === viewOptions.POPUP){
if(flags.isWeb){
renderiFrame({url: content.url, isIOS: flags.isIOS});
return;
} else {
buildfire.navigation.openWindow(content.url, "_blank");
}
}
else
buildfire.navigation.openWindow(content.url, "_system");

Expand All @@ -36,9 +42,15 @@ const render = (content) => {
return;
}
if(displaySuccessMessage){
window.document.getElementById('successMessage').style.display = 'block';
window.document.getElementById('targetUrl').href = content.url;
return;
if(flags.isWeb){
renderiFrame({url: content.url, isIOS: flags.isIOS});
return;
} else {
window.document.getElementById('successMessage').style.display = 'block';
window.document.getElementById('targetUrl').href = content.url;
return;
}

}
};

Expand Down

0 comments on commit 2a52d42

Please sign in to comment.