diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2020-06-18 15:20:49 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-18 15:20:49 -0700 |
| commit | bf59152c01d9ffc4ceeb982e26b3df2354ebede6 (patch) | |
| tree | 99687cfeeba022301054a9b71762dbaaf6d39e38 /library/std/src/sys/unix/stack_overflow.rs | |
| parent | e1549786ff6105af4f3e9be30496c812b7ca71b3 (diff) | |
| parent | 1bc4e45b3fe3a0817908bd7cc21ec23798d38d63 (diff) | |
| download | rust-bf59152c01d9ffc4ceeb982e26b3df2354ebede6.tar.gz rust-bf59152c01d9ffc4ceeb982e26b3df2354ebede6.zip | |
Rollup merge of #72968 - integer32llc:docs-arrow-keys, r=GuillaumeGomez
Only highlight doc search results via mouseover if mouse has moved ## What happens - Go to https://doc.rust-lang.org/stable/std/index.html - Put your mouse cursor somewhere in the middle where search results will appear and then don't move the mouse - Press 's' to focus the search box - Type a query that brings up enough search results to go under where your mouse cursor is - Press the down arrow - The search result that is one below where your mouse cursor is will be highlighted. ## What I expected When not currently using the mouse, I expect doing a search and then pressing the down arrow to always highlight the first search result immediately below the search box. ## The fix This feels a bit hacky to me; I'm open to other solutions. This introduces a global JS var that keeps track of whether the person searching has moved their mouse after doing a search or not, and only uses the mouse position to highlight search results if the person HAS moved the mouse AFTER doing a search.
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
