Magic search code for keyboard shortcuts


(Sam Saffron) #1

There appears to be a bunch of magic code in controllers/search.js.es6 for handling up / down arrow for search results.

I just had a play here and it appears we can just use tab to do this, so all this magic is no longer needed.

Are we good to nuke all this code with extreme prejudice?

@cpradio @TechnoBear @eviltrout


(cpradio) #2

Yep, definitely looks like moveUp, moveDown, and select can be removed from the controller. Seems I missed that when I did the following:
https://github.com/cpradio/discourse/commit/0784c52a24f5ff743d3c3290e4fcbc05b0b37176


(cpradio) #3

PR Sent
https://github.com/discourse/discourse/pull/2747


(Robin Ward) #4

Happy to remove it, also followed up with dead code removal:

https://github.com/discourse/discourse/commit/dac4ed5a1e0216b22ad1a7a5aec2c1f7af34017e


(Jeff Atwood) #5