This repository was archived by the owner on Jan 11, 2023. It is now read-only.
Description In Firefox, pressing arrow down and arrow up in the function result list iterates through the list nicely.
Holding either the arrow up or down key down for long creates an undesirable affect where the list becomes increasingly janky.
It would be nice to explore workarounds to help with this issue a bit.
diff --git a/src/components/Editor/SearchBar.js b/src/components/Editor/SearchBar.js
index 7a4c581..1eeccbe 100644
--- a/src/components/Editor/SearchBar.js
+++ b/src/components/Editor/SearchBar.js
@@ -147,6 +147,7 @@ const SearchBar = React.createClass({
}
if (this.refs.resultList && this.refs.resultList.refs) {
+ // I think this is where we scroll
scrollList(this.refs.resultList.refs, this.state.selectedResultIndex);
}
@@ -410,6 +411,9 @@ const SearchBar = React.createClass({
line: item.location.start.line,
});
+ // clear the search ?!?!
+ this.clearSearch();
+
this.closeSearch(e);
}
},
diff --git a/src/utils/result-list.js b/src/utils/result-list.js
index 4afc7c0..4f3ac6f 100644
--- a/src/utils/result-list.js
+++ b/src/utils/result-list.js
@@ -3,6 +3,7 @@ const { isFirefox } = require("devtools-config");
function scrollList(resultList, index) {
const resultEl = resultList[index];
+ // here's where we scroll in firefox
if (isFirefox()) {
resultEl.scrollIntoView({ block: "end", behavior: "smooth" });
} else {
GIF
Reactions are currently unavailable
In Firefox, pressing arrow down and arrow up in the function result list iterates through the list nicely.
Holding either the arrow up or down key down for long creates an undesirable affect where the list becomes increasingly janky.
It would be nice to explore workarounds to help with this issue a bit.
GIF