From 5a663e6b2ffd5f55e518f89ce693eca0bfed134f Mon Sep 17 00:00:00 2001 From: Jez Ng Date: Sun, 26 Feb 2012 23:29:34 -0500 Subject: Don't pass to page when quitting insert mode. --- vimiumFrontend.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'vimiumFrontend.js') diff --git a/vimiumFrontend.js b/vimiumFrontend.js index 75b792b9..66e96d49 100644 --- a/vimiumFrontend.js +++ b/vimiumFrontend.js @@ -101,7 +101,6 @@ var settings = { frameId = Math.floor(Math.random()*999999999) var hasModifiersRegex = /^<([amc]-)+.>/; -var googleRegex = /:\/\/[^/]*google[^/]+/; /* * Complete initialization work that sould be done prior to DOMReady. @@ -484,11 +483,7 @@ function onKeydown(event) { if (isEditable(event.srcElement)) event.srcElement.blur(); exitInsertMode(); - - // Added to prevent Google Instant from reclaiming the keystroke and putting us back into the search - // box. - if (isGoogleSearch()) - event.stopPropagation(); + suppressEvent(event); } } else if (findMode) { @@ -557,12 +552,6 @@ function checkIfEnabledForUrl() { }); } -// TODO(ilya): This just checks if "google" is in the domain name. Probably should be more targeted. -function isGoogleSearch() { - var url = window.location.toString(); - return !!url.match(googleRegex); -} - function refreshCompletionKeys(response) { if (response) { currentCompletionKeys = response.completionKeys; -- cgit v1.2.3