File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
scaladoc-js/src/searchbar Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -165,10 +165,13 @@ class SearchbarComponent(val callback: (String) => List[PageEntry]):
165165
166166 private def handleGlobalKeyDown (e : KeyboardEvent ) = {
167167 // if the user presses the "S" key while not focused on an input, open the search
168- if (e.key == " s" ) {
168+ if (e.key == " s" || e.key == " / " ) {
169169 val tag = e.target.asInstanceOf [html.Element ].tagName
170170 if (tag != " INPUT" && tag != " TEXTAREA" ) {
171171 if (! document.body.contains(rootDiv)) {
172+ // Firefox's "quick find" uses "/" as a trigger; prevent that.
173+ e.preventDefault()
174+
172175 document.body.appendChild(rootDiv)
173176 // if we focus during the event handler, the `s` gets typed into the input
174177 window.setTimeout(() => input.focus(), 1.0 )
You can’t perform that action at this time.
0 commit comments