aboutsummaryrefslogtreecommitdiff
path: root/ext/js
diff options
context:
space:
mode:
authorKuuuube <61125188+Kuuuube@users.noreply.github.com>2024-06-22 00:37:48 -0400
committerGitHub <noreply@github.com>2024-06-22 04:37:48 +0000
commit079603c1f65ac2eb85861ad8d8fd10b6db315e11 (patch)
tree0f5ff21f7676fe9ec8a8e200999128b5a894649e /ext/js
parent6d890b798113c9a08670f20303c6fc8de4dc4677 (diff)
Fix firefox search button 1px off of search textbox (#1115)
Diffstat (limited to 'ext/js')
-rw-r--r--ext/js/display/search-display-controller.js16
1 files changed, 11 insertions, 5 deletions
diff --git a/ext/js/display/search-display-controller.js b/ext/js/display/search-display-controller.js
index 8dad19d7..b0f0d8e8 100644
--- a/ext/js/display/search-display-controller.js
+++ b/ext/js/display/search-display-controller.js
@@ -566,14 +566,20 @@ export class SearchDisplayController {
* @param {boolean} shrink
*/
_updateSearchHeight(shrink) {
- const node = this._queryInput;
+ const searchTextbox = this._queryInput;
+ const searchItems = [this._queryInput, this._searchButton, this._searchBackButton];
+
if (shrink) {
- node.style.height = '0';
+ for (const searchButton of searchItems) {
+ searchButton.style.height = '0';
+ }
}
- const {scrollHeight} = node;
- const currentHeight = node.getBoundingClientRect().height;
+ const {scrollHeight} = searchTextbox;
+ const currentHeight = searchTextbox.getBoundingClientRect().height;
if (shrink || scrollHeight >= currentHeight - 1) {
- node.style.height = `${scrollHeight}px`;
+ for (const searchButton of searchItems) {
+ searchButton.style.height = `${scrollHeight}px`;
+ }
}
}