diff --git a/xpfe/global/resources/content/charsetOverlay.js b/xpfe/global/resources/content/charsetOverlay.js index 5c173153d87..7e51a0f8017 100644 --- a/xpfe/global/resources/content/charsetOverlay.js +++ b/xpfe/global/resources/content/charsetOverlay.js @@ -98,7 +98,10 @@ function SetForcedCharset(charset) function UpdateCurrentCharset() { - var charset = document.commandDispatcher.focusedWindow.document.characterSet; + var wnd = document.commandDispatcher.focusedWindow; + if (window == wnd) wnd = window.content; + + var charset = wnd.document.characterSet; dump("Update current charset: " + charset + "\n"); var menuitem = document.getElementById('charset.' + charset);