Search: Keyboard Bindings for easier navigation (#138)
* set up basic actions on keypress * add actions to perform conditionally * add simple highlight animation * prevent mouseclick to change active element * clear input box on Escape * click on Arrow Right * clear results and focus search-input on esc * refactor
This commit is contained in:
parent
d6b2282582
commit
b7f8749cdf
3 changed files with 71 additions and 5 deletions
|
|
@ -1,4 +1,4 @@
|
|||
.searchbox input {
|
||||
#searchbox input {
|
||||
padding: 4px 10px;
|
||||
width: 100%;
|
||||
color: var(--primary);
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
border-radius: var(--radius);
|
||||
}
|
||||
|
||||
.searchbox input:focus {
|
||||
#searchbox input:focus {
|
||||
border-color: var(--secondary);
|
||||
}
|
||||
|
||||
|
|
@ -38,3 +38,7 @@
|
|||
left: 0px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
#searchResults .active {
|
||||
transform: scale(.98);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue