Closed Bug 436454 Opened 16 years ago Closed 16 years ago

click to bookmark this page javascript issue

Categories

(Firefox :: Bookmarks & History, defect)

x86
Windows XP
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 214530

People

(Reporter: admin, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14

during site testing, When selecting "bookmark this page" link on my website the bookmark is saved ok but when i use the bookmark it opens the page in a sidebar. there is a setting to correct it but its left to the user which is not a good look. 

Reproducible: Always

Steps to Reproduce:
1.visit www.supalist.com 
2. click on bookmark this page
3. save bookmark
4. then use the bookmark.
Actual Results:  
the bookmarked page opens in the sidebar even if the sidebar is closed.

Expected Results:  
should open the page in the main window

works ok ie
This is the javascript which can reproduce this effect every time:

window.sidebar.addPanel(title, url,"");
// replace title and url with string equivalents
// IE: window.sidebar.addPanel("FIREFOX", "http://www.mozilla.com/en-US/firefox/","");

The resultant link created via this javascript code (either embedded within an anchor tag's href using the javascript: descriptor OR through a function that is accessed through href/onClick) will allow a user to bookmark the page located in the parameter list. However, the resultant bookmark opens in the sidebar by default.

This could be because window.sidebar is being used and we're "adding a panel" to the sidebar. This kind of syntax is not semantically incorrect if you're attempting to add a panel to the sidebar, but it is for displaying the bookmark dialog.

I guess we need a way to bring up the bookmark dialog in a semantically friendly way. perhaps a window.addBookmark(title, url, "") function. Or possibly provide a boolean in the window.sidebar.addpanel parameter list that defaults to true. This would have current behavior, false would create a standard bookmark that opens in the content area.
I can confirm this Bug - 6 years of looking at and testing JavaScript code, I have found nothing that works in Mozilla/Firefox. Mozilla needs to come up with JavaScript code that works on web pages. I am surprised that with all the coding for Places and Sqlite in Firefox 3 that this tiny little feature was over looked.
yes: it's a useful fix, in the age of ajax pages, it's important to be able to offer that functionality to our users of ajax one-page web apps. Great mozilla, please fix this !!
latest trunk at least should show immediately the "load bookmark in sidebar" checkbox so you can uncheck that on add, and that's a first workaround.

however as it is this bug is invalid since addPanel should add a panel, and is what is doing. instead you shoul file a bug asking for a new javascript function to add a normal bookmark.
Ok, just did it here: 

https://bugzilla.mozilla.org/show_bug.cgi?id=463825

You can now close this bug if you want. Thank you.
Well, that and this were the exact same thing, "I as the site owner want to be able to add a bookmark to visitors' browsers that doesn't open in the sidebar," a thing which is bug 214530.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.