mirror of
https://github.com/hodgef/simple-keyboard.git
synced 2025-02-01 02:53:07 +08:00
Add event to PhysicalKeyboard onpointer*. Fixes https://github.com/hodgef/react-simple-keyboard/issues/2565
This commit is contained in:
parent
2db277f3eb
commit
320878f93c
@ -66,7 +66,7 @@ class PhysicalKeyboard {
|
|||||||
// Even though we have an array of buttons, we just want to press one of them
|
// Even though we have an array of buttons, we just want to press one of them
|
||||||
if (options.physicalKeyboardHighlightPress) {
|
if (options.physicalKeyboardHighlightPress) {
|
||||||
if (options.physicalKeyboardHighlightPressUsePointerEvents) {
|
if (options.physicalKeyboardHighlightPressUsePointerEvents) {
|
||||||
buttonDOM[0]?.onpointerdown();
|
buttonDOM[0]?.onpointerdown?.(e);
|
||||||
} else if (options.physicalKeyboardHighlightPressUseClick) {
|
} else if (options.physicalKeyboardHighlightPressUseClick) {
|
||||||
buttonDOM[0]?.click();
|
buttonDOM[0]?.click();
|
||||||
} else {
|
} else {
|
||||||
@ -78,7 +78,7 @@ class PhysicalKeyboard {
|
|||||||
|
|
||||||
if (options.physicalKeyboardHighlightPress) {
|
if (options.physicalKeyboardHighlightPress) {
|
||||||
if (options.physicalKeyboardHighlightPressUsePointerEvents) {
|
if (options.physicalKeyboardHighlightPressUsePointerEvents) {
|
||||||
buttonDOM.onpointerdown();
|
buttonDOM?.onpointerdown?.(e);
|
||||||
} else if (options.physicalKeyboardHighlightPressUseClick) {
|
} else if (options.physicalKeyboardHighlightPressUseClick) {
|
||||||
buttonDOM.click();
|
buttonDOM.click();
|
||||||
} else {
|
} else {
|
||||||
@ -117,13 +117,13 @@ class PhysicalKeyboard {
|
|||||||
|
|
||||||
// Even though we have an array of buttons, we just want to press one of them
|
// Even though we have an array of buttons, we just want to press one of them
|
||||||
if (options.physicalKeyboardHighlightPressUsePointerEvents) {
|
if (options.physicalKeyboardHighlightPressUsePointerEvents) {
|
||||||
buttonDOM[0]?.onpointerup();
|
buttonDOM[0]?.onpointerup?.(e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
applyButtonStyle(buttonDOM);
|
applyButtonStyle(buttonDOM);
|
||||||
|
|
||||||
if (options.physicalKeyboardHighlightPressUsePointerEvents) {
|
if (options.physicalKeyboardHighlightPressUsePointerEvents) {
|
||||||
buttonDOM.onpointerup();
|
buttonDOM?.onpointerup?.(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user