mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
#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:
parent
ce31522497
commit
9850ca25cf
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user