Skip to content

Commit

Permalink
Update preview window when modify my app and preview. Link to mviewer…
Browse files Browse the repository at this point in the history
  • Loading branch information
LPoin committed Oct 8, 2024
1 parent 5b7d814 commit fed8d6f
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 fed8d6f

Please sign in to comment.