mirror of
https://github.com/ZetaKebab/quartz.git
synced 2025-06-22 00:34:37 +00:00
feat(search): keyboard-accessible search button (#1331)
* Use a `<button>` for search * Fix search button styles to match preexisting styling * Remove additional native button properties. * Invoke search button on click or keyboard. * Reorganize search button DOM hierarchy * Restore focus to the search button when exiting the search overlay * Run prettier on Search.tsx
This commit is contained in:
@ -3,6 +3,7 @@ export function registerEscapeHandler(outsideContainer: HTMLElement | null, cb:
|
||||
function click(this: HTMLElement, e: HTMLElementEventMap["click"]) {
|
||||
if (e.target !== this) return
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
cb()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user