Skip to content

Commit

Permalink
clear button now properly scales with seach bar
Browse files Browse the repository at this point in the history
  • Loading branch information
tadorituki committed Oct 14, 2024
1 parent b1b17fe commit 1c560b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ext/js/display/search-display-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class SearchDisplayController {
/** @type {HTMLButtonElement} */
this._searchButton = querySelectorNotNull(document, '#search-button');
/** @type {HTMLButtonElement} */
this._crossButton = querySelectorNotNull(document, '#clear-button');
this._clearButton = querySelectorNotNull(document, '#clear-button');
/** @type {HTMLButtonElement} */
this._searchBackButton = querySelectorNotNull(document, '#search-back-button');
/** @type {HTMLTextAreaElement} */
Expand Down Expand Up @@ -106,7 +106,7 @@ export class SearchDisplayController {
this._display.setHistorySettings({useBrowserHistory: true});

this._searchButton.addEventListener('click', this._onSearch.bind(this), false);
this._crossButton.addEventListener('click', this._onClear.bind(this), false);
this._clearButton.addEventListener('click', this._onClear.bind(this), false);

this._searchBackButton.addEventListener('click', this._onSearchBackButtonClick.bind(this), false);
this._wanakanaEnableCheckbox.addEventListener('change', this._onWanakanaEnableChange.bind(this));
Expand Down Expand Up @@ -630,7 +630,7 @@ export class SearchDisplayController {
*/
_updateSearchHeight(shrink) {
const searchTextbox = this._queryInput;
const searchItems = [this._queryInput, this._searchButton, this._searchBackButton];
const searchItems = [this._queryInput, this._searchButton, this._searchBackButton, this._clearButton];

if (shrink) {
for (const searchButton of searchItems) {
Expand Down

0 comments on commit 1c560b1

Please sign in to comment.