From 3e7f3af63c01e39577bdc548d0dc81e83020df78 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Mon, 30 Aug 2021 21:55:08 -0400 Subject: Fix history replacement issue (#1917) * Remove unused "history" field of event details * Change setContent history parameter to historyMode --- ext/js/display/search-display-controller.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ext/js/display/search-display-controller.js') diff --git a/ext/js/display/search-display-controller.js b/ext/js/display/search-display-controller.js index 6bdef2c8..81124bbb 100644 --- a/ext/js/display/search-display-controller.js +++ b/ext/js/display/search-display-controller.js @@ -185,12 +185,12 @@ class SearchDisplayController { e.preventDefault(); e.stopImmediatePropagation(); this._display.blurElement(e.currentTarget); - this._search(true, true, true, null); + this._search(true, 'new', true, null); } _onSearch(e) { e.preventDefault(); - this._search(true, true, true, null); + this._search(true, 'new', true, null); } _onCopy() { @@ -205,7 +205,7 @@ class SearchDisplayController { } this._queryInput.value = text; this._updateSearchHeight(true); - this._search(animate, false, autoSearchContent, ['clipboard']); + this._search(animate, 'clear', autoSearchContent, ['clipboard']); } _onWanakanaEnableChange(e) { @@ -362,7 +362,7 @@ class SearchDisplayController { }); } - _search(animate, history, lookup, flags) { + _search(animate, historyMode, lookup, flags) { const query = this._queryInput.value; const depth = this._display.depth; const url = window.location.href; @@ -373,7 +373,7 @@ class SearchDisplayController { } const details = { focus: false, - history, + historyMode, params: { query }, -- cgit v1.2.3