diff --git a/content/modes.js b/content/modes.js index 535f1cfa..b8ab553a 100644 --- a/content/modes.js +++ b/content/modes.js @@ -121,7 +121,8 @@ const modes = (function () //{{{ // Kludge to prevent the input field losing focus on MS/Mac setTimeout(function () { let focus = document.commandDispatcher.focusedElement; - if (focus != document.getElementById("urlbar").inputField) + let urlbar = document.getElementById("urlbar"); + if (!urlbar || focus != urlbar.inputField) liberator.focusContent(false); }, 100); }