Revert "stop select dialog event propagation"
This reverts commit 46be47d0be.
This commit is contained in:
parent
25f0a2b80b
commit
232e531091
1 changed files with 4 additions and 20 deletions
|
|
@ -157,26 +157,10 @@ export function DialogSelect<T>(props: DialogSelectProps<T>) {
|
||||||
|
|
||||||
const keybind = useKeybind()
|
const keybind = useKeybind()
|
||||||
useKeyboard((evt) => {
|
useKeyboard((evt) => {
|
||||||
if (evt.name === "up" || (evt.ctrl && evt.name === "p")) {
|
if (evt.name === "up" || (evt.ctrl && evt.name === "p")) move(-1)
|
||||||
evt.preventDefault()
|
if (evt.name === "down" || (evt.ctrl && evt.name === "n")) move(1)
|
||||||
evt.stopPropagation()
|
if (evt.name === "pageup") move(-10)
|
||||||
move(-1)
|
if (evt.name === "pagedown") move(10)
|
||||||
}
|
|
||||||
if (evt.name === "down" || (evt.ctrl && evt.name === "n")) {
|
|
||||||
evt.preventDefault()
|
|
||||||
evt.stopPropagation()
|
|
||||||
move(1)
|
|
||||||
}
|
|
||||||
if (evt.name === "pageup") {
|
|
||||||
evt.preventDefault()
|
|
||||||
evt.stopPropagation()
|
|
||||||
move(-10)
|
|
||||||
}
|
|
||||||
if (evt.name === "pagedown") {
|
|
||||||
evt.preventDefault()
|
|
||||||
evt.stopPropagation()
|
|
||||||
move(10)
|
|
||||||
}
|
|
||||||
if (evt.name === "return") {
|
if (evt.name === "return") {
|
||||||
const option = selected()
|
const option = selected()
|
||||||
if (option) {
|
if (option) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue