Set PhysicalKeyboardHighlight pointerup appropriately. Per #1506

This commit is contained in:
Francisco Hodge 2022-04-14 22:37:03 -07:00
parent a111940488
commit d2c7a2fda7

View File

@ -55,7 +55,6 @@ class PhysicalKeyboard {
if (options.physicalKeyboardHighlightPress) {
if (options.physicalKeyboardHighlightPressUsePointerEvents) {
buttonDOM.onpointerdown();
buttonDOM.onpointerup();
} else if (options.physicalKeyboardHighlightPressUseClick) {
buttonDOM.click();
} else {
@ -67,6 +66,7 @@ class PhysicalKeyboard {
}
handleHighlightKeyUp(event: KeyboardEvent) {
const options = this.getOptions();
const buttonPressed = this.getSimpleKeyboardLayoutKey(event);
this.dispatch((instance: any) => {
@ -76,6 +76,9 @@ class PhysicalKeyboard {
if (buttonDOM && buttonDOM.removeAttribute) {
buttonDOM.removeAttribute("style");
if (options.physicalKeyboardHighlightPressUsePointerEvents) {
buttonDOM.onpointerup();
}
}
});
}