Skip to content

Commit

Permalink
fix(web): OSK set activeKeyboard should not bypass during init
Browse files Browse the repository at this point in the history
  • Loading branch information
jahorton committed Apr 5, 2024
1 parent 4b1394a commit eebf3e5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/src/engine/osk/src/views/oskView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ export default abstract class OSKView
private _baseFontSize: ParsedLengthStyle;

private needsLayout: boolean = true;
private initialized: boolean;

private _animatedHideTimeout: number;

Expand Down Expand Up @@ -257,6 +258,8 @@ export default abstract class OSKView
if(this.hostDevice.touchable) {
this.setBaseTouchEventListeners();
}

this.initialized = true;
}

protected get configuration(): Configuration {
Expand Down Expand Up @@ -546,7 +549,7 @@ export default abstract class OSKView
//
// Note: ensures that the _instances_ are the same; it's possible to make new instances
// to force a refresh. Does not perform a deep-equals.
if(this.keyboardData?.keyboard == keyboardData?.keyboard && this.keyboardData?.metadata == keyboardData?.metadata) {
if(this.initialized && this.keyboardData?.keyboard == keyboardData?.keyboard && this.keyboardData?.metadata == keyboardData?.metadata) {
return;
}
this.keyboardData = keyboardData;
Expand Down

0 comments on commit eebf3e5

Please sign in to comment.