Skip to content

Commit

Permalink
fix: fixed #2161
Browse files Browse the repository at this point in the history
  • Loading branch information
arnog committed Nov 16, 2023
1 parent c0b06b2 commit 7b0242e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
origin
- **#2175** Addressed some rendering issues with Safar where a fraction inside a `\left...\right` was vertically offset.
- **#2176** Using the `[hide-keyboard]` virtual keycap would cause a runtime error.
- **#2161** When the virtual keyboard is hidden, a `geometrychange` event is
dispatched.

## 0.96.0 (2023-11-14)

Expand Down
9 changes: 6 additions & 3 deletions src/virtual-keyboard/virtual-keyboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -778,9 +778,12 @@ export class VirtualKeyboard implements VirtualKeyboardInterface, EventTarget {

stateChanged(): void {
this.dispatchEvent(new Event('virtual-keyboard-toggle'));
this.sendMessage('geometry-changed', {
boundingRect: this.boundingRect,
});
if (!this._visible) {
this.dispatchEvent(new Event('geometrychange'));
this.sendMessage('geometry-changed', {
boundingRect: this.boundingRect,
});
}
}

/**
Expand Down

0 comments on commit 7b0242e

Please sign in to comment.