Index: lib/typoAppIntegration.js |
=================================================================== |
--- a/lib/typoAppIntegration.js |
+++ b/lib/typoAppIntegration.js |
@@ -111,16 +111,19 @@ switch (application) |
exports.getBrowser = (window) => "gBrowser" in window ? window.gBrowser : null; |
exports.applyToWindow = function(window, corrector) |
{ |
let urlbar = exports.getURLBar(window); |
if (urlbar && urlbar.handleCommand && !functionHooks.has(window)) |
{ |
+ if (!urlbar.hasOwnProperty("handleCommand")) |
+ urlbar = Object.getPrototypeOf(urlbar); |
+ |
// Handle new URLs being entered |
let unhook = hook(urlbar, "handleCommand", function() |
{ |
let correction = corrector(window, urlbar.value); |
if (correction) |
urlbar.value = correction; |
}); |
functionHooks.set(window, unhook); |