Skip to content

Commit

Permalink
Merge pull request mviewer#307 from jdev-org/issue-284
Browse files Browse the repository at this point in the history
Update preview window when modify my app and preview.
  • Loading branch information
lecault authored Oct 11, 2024
2 parents e6341cf + fed8d6f commit 7dd933c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/mviewerstudio.js
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,11 @@ let previewAppsWithoutSave = (id, showPublish) => {
.then((r) => (r.ok ? r.json() : Promise.reject(r)))
.then((data) => {
const url = mv.produceUrl(data.file, config.relation && config.showPublish);
window.open(url, "mvs_vizualize");
const prevWindow = window.open(url, "mvs_vizualize");
if (prevWindow) {
prevWindow.focus();
prevWindow.location.reload();
}
})
.catch((err) => alertCustom(mviewer.tr("msg.xml_doc_invalid"), "error"));
};
Expand Down

0 comments on commit 7dd933c

Please sign in to comment.