Skip to content

Commit

Permalink
Merge pull request #11743 from keymanapp/fix/web/newContext-device
Browse files Browse the repository at this point in the history
fix(web): set new-context rules' device to match that of the active OSK
  • Loading branch information
jahorton authored Jun 14, 2024
2 parents fe320ea + 7b4509a commit b7c3611
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions web/src/engine/main/src/keymanEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,10 @@ export default class KeymanEngine<
this.core.keyboardProcessor.layerStore.handler = this.osk.layerChangeHandler;
}
this._osk = value;
// As the `new context` ruleset is designed to facilitate OSK layer-change updates
// based on the context being entered, we want the keyboard processor's current
// contextDevice to match that of the active OSK. See #11740.
this.core.keyboardProcessor.contextDevice = value.targetDevice ?? this.config.softDevice;
if(value) {
// Don't build an OSK if no keyboard is available yet; avoid the extra flash.
if(this.contextManager.activeKeyboard) {
Expand Down

0 comments on commit b7c3611

Please sign in to comment.