From 115319f3acce6ba0f602087f1d91f5f8729071b1 Mon Sep 17 00:00:00 2001 From: "davidm%netscape.com" Date: Fri, 1 Oct 1999 03:28:43 +0000 Subject: [PATCH] 4912 an't open bookmarks when no other window open --- suite/browser/navigator.js | 13 ++++++++++--- suite/browser/navigator.xul | 8 ++++---- xpfe/browser/resources/content/navigator.js | 13 ++++++++++--- xpfe/browser/resources/content/navigator.xul | 8 ++++---- 4 files changed, 28 insertions(+), 14 deletions(-) diff --git a/suite/browser/navigator.js b/suite/browser/navigator.js index 65626e649c65..772c5436822e 100644 --- a/suite/browser/navigator.js +++ b/suite/browser/navigator.js @@ -655,9 +655,16 @@ function UpdateBookmarksLastVisitedDate(event) if (url.substring(0, 3) == "NC:") { return false; } - - window.content.location.href = url; - RefreshUrlbar(); + // Check if we have a browser window + if ( window.content == null ) + { + window.openDialog( "chrome://navigator/content/navigator.xul", "_blank", "chrome,all,dialog=no", url ); + } + else + { + window.content.location.href = url; + RefreshUrlbar(); + } } function OpenSearch(tabName, searchStr) diff --git a/suite/browser/navigator.xul b/suite/browser/navigator.xul index 86fef7e3feeb..14d04cd5de74 100644 --- a/suite/browser/navigator.xul +++ b/suite/browser/navigator.xul @@ -259,21 +259,21 @@ Contributor(s): ______________________________________. --> ondraggesture="return BeginDragPersonalToolbar(event);" ondragdrop="return DropPersonalToolbar(event);" ondragover="return DragOverPersonalToolbar(event);" - onclick="OpenBookmarkURL(event.target, 'PersonalToolbar')"> + > diff --git a/xpfe/browser/resources/content/navigator.js b/xpfe/browser/resources/content/navigator.js index 65626e649c65..772c5436822e 100644 --- a/xpfe/browser/resources/content/navigator.js +++ b/xpfe/browser/resources/content/navigator.js @@ -655,9 +655,16 @@ function UpdateBookmarksLastVisitedDate(event) if (url.substring(0, 3) == "NC:") { return false; } - - window.content.location.href = url; - RefreshUrlbar(); + // Check if we have a browser window + if ( window.content == null ) + { + window.openDialog( "chrome://navigator/content/navigator.xul", "_blank", "chrome,all,dialog=no", url ); + } + else + { + window.content.location.href = url; + RefreshUrlbar(); + } } function OpenSearch(tabName, searchStr) diff --git a/xpfe/browser/resources/content/navigator.xul b/xpfe/browser/resources/content/navigator.xul index 86fef7e3feeb..14d04cd5de74 100644 --- a/xpfe/browser/resources/content/navigator.xul +++ b/xpfe/browser/resources/content/navigator.xul @@ -259,21 +259,21 @@ Contributor(s): ______________________________________. --> ondraggesture="return BeginDragPersonalToolbar(event);" ondragdrop="return DropPersonalToolbar(event);" ondragover="return DragOverPersonalToolbar(event);" - onclick="OpenBookmarkURL(event.target, 'PersonalToolbar')"> + >