diff options
| author | Stephen Blott | 2015-06-13 12:59:17 +0100 |
|---|---|---|
| committer | Stephen Blott | 2015-06-13 12:59:17 +0100 |
| commit | f34f842417bdac363fac5a3e47366b3ee94c2454 (patch) | |
| tree | 6681cfae635d448fb06a3b1cec1848bab81be4d8 | |
| parent | c21aa9ab03d5537d575d3c46d3affce7f3ece5e5 (diff) | |
| download | vimium-f34f842417bdac363fac5a3e47366b3ee94c2454.tar.bz2 | |
Fix returnToViewport.
The super-class's constructor sets @options, so we can't set it here;
instead, we pass the options along.
| -rw-r--r-- | content_scripts/mode_find.coffee | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/content_scripts/mode_find.coffee b/content_scripts/mode_find.coffee index 21918be2..297c4158 100644 --- a/content_scripts/mode_find.coffee +++ b/content_scripts/mode_find.coffee @@ -60,14 +60,15 @@ class FindMode extends Mode matchCount: 0 hasResults: false - constructor: (@options = {}) -> + constructor: (options = {}) -> + console.log "constructor", @options # Save the selection, so findInPlace can restore it. @initialRange = getCurrentRange() FindMode.query = rawQuery: "" - if @options.returnToViewport + if options.returnToViewport @scrollX = window.scrollX @scrollY = window.scrollY - super + super extend options, name: "find" indicator: false exitOnClick: true |
