From 870ca562bfe904971b6055a67259b5c21b1655ee Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Tue, 2 Jun 2015 16:39:01 +0100 Subject: Fix returnToViewport support for FindMode This was broken by the move to taking input in an iframe, since the frontend was no longer getting keydown events for text changes, and so the viewport wasn't being scrolled back to its original position until the mode was exiting. --- content_scripts/hud.coffee | 1 + 1 file changed, 1 insertion(+) (limited to 'content_scripts') diff --git a/content_scripts/hud.coffee b/content_scripts/hud.coffee index 2b3748bf..f16fcca6 100644 --- a/content_scripts/hud.coffee +++ b/content_scripts/hud.coffee @@ -35,6 +35,7 @@ HUD = @hudUI.postMessage {name: "updateMatchesCount", matchCount, showMatchText} search: (data) -> + window.scrollTo findMode.scrollX, findMode.scrollY if findMode.options.returnToViewport findModeQuery.rawQuery = data.query updateFindModeQuery() performFindInPlace() -- cgit v1.2.3