зеркало из https://github.com/mozilla/pjs.git
#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:
Родитель
05e18c0a15
Коммит
61d50fb31a
|
@ -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)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче