#44011 the bookmark charset does not work correctly if we select sidebar first

ra = ftang
doc charset can be and should be get directly from window without paying
any attention to focused window.
This commit is contained in:
shanjian%netscape.com 2000-09-01 22:56:15 +00:00
parent ce31522497
commit 9850ca25cf

View File

@ -145,15 +145,10 @@ function UpdateBookmarksLastVisitedDate(event)
{
try
{
var wnd = document.commandDispatcher.focusedWindow;
if (window == wnd) wnd = window._content;
var docCharset = wnd.document.characterSet;
// if the URL is bookmarked, update its "Last Visited" date
var bmks = Components.classes["component://netscape/browser/bookmarks-service"].getService();
if (bmks) bmks = bmks.QueryInterface(Components.interfaces.nsIBookmarksService);
if (bmks) bmks.UpdateBookmarkLastVisitedDate(window._content.location.href, docCharset);
if (bmks) bmks.UpdateBookmarkLastVisitedDate(window._content.location.href, window._content.document.characterSet);
}
catch(ex)
{