about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2020-06-26 00:38:58 -0700
committerGitHub <noreply@github.com>2020-06-26 00:38:58 -0700
commita25fbb971095391667e2ec1f05d0d579adb7f3e8 (patch)
treed152d81978db0e31bec81b5497969bdfb7faa70a /src/test/codegen/src-hash-algorithm
parent14dc103a85694a67e25ade61c3af4db234b14a9a (diff)
parente85df08bdec792f512c1f92dbdb126c49ac57d0c (diff)
downloadrust-a25fbb971095391667e2ec1f05d0d579adb7f3e8.tar.gz
rust-a25fbb971095391667e2ec1f05d0d579adb7f3e8.zip
Rollup merge of #72967 - integer32llc:prevent-default-arrows, r=kinnison
Don't move cursor in search box when using arrows to navigate results

## What happens

- Go to https://doc.rust-lang.org/stable/std/index.html
- Press 's' to focus the search box
- Type a query like 'test'
- Press the down arrow one or more times to change which search result is highlighted
- Press the up arrow once to go up one search result
- Notice the cursor in the search box is now at the beginning of your query, such that if you now typed 'a' the search box would contain 'atest', when it would be expected that the cursor would have remained where it was and if you typed 'a' at this point it would result in 'testa'
- Press the down arrow once to go down one search result
- Now notice the cursor is at the end of your query again

## What I expected

I expected that changing which search result was highlighted using the up and down arrows would have no effect on where the cursor was in the search box.

## The fix

This PR prevents the default action of the up and down arrows when the custom keydown events are happening during a search.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions