mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-12-08 01:38:06 +00:00
tm-open-window set focus to existing window (#7708)
* tm-open-window set focus to existing window * tm-open-window: update docs
This commit is contained in:
@@ -40,7 +40,7 @@ exports.startup = function() {
|
||||
variables = $tw.utils.extend({},paramObject,{currentTiddler: title, "tv-window-id": windowID});
|
||||
// Open the window
|
||||
var srcWindow,
|
||||
srcDocument;
|
||||
srcDocument;
|
||||
// In case that popup blockers deny opening a new window
|
||||
try {
|
||||
srcWindow = window.open("","external-" + windowID,"scrollbars,width=" + width + ",height=" + height + (top ? ",top=" + top : "" ) + (left ? ",left=" + left : "" )),
|
||||
@@ -52,6 +52,7 @@ exports.startup = function() {
|
||||
$tw.windows[windowID] = srcWindow;
|
||||
// Check for reopening the same window
|
||||
if(srcWindow.haveInitialisedWindow) {
|
||||
srcWindow.focus();
|
||||
return;
|
||||
}
|
||||
// Initialise the document
|
||||
|
||||
Reference in New Issue
Block a user