-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hopefully a final solution for the soft keyboard in iOS. (#134)
We manually set the gameport height in input blur/focus event handlers. Then when the visualViewport:resize event arrives later on, it should ideally be already the same height, or else very close to it. I discovered that iOS actually sends 3 resize events on focus, for the keyboard being up, then down, then up again. So I throttle the resize handler in iOS. Use the body-scroll-lock package to handle scrolling in iOS, letting me remove a bunch of old scrolling code. Note that the body and html elements need `height: 100%; width: 100%` CSS to be applied. The TextInput.refocus() function was being called multiple times when the soft keyboard changed. Prevent it from being called more than once after each turn.
- Loading branch information
1 parent
18df014
commit 9411ea2
Showing
4 changed files
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule asyncglk
updated
6 files
+2 −0 | package.json | |
+28 −30 | src/glkote/web/input.ts | |
+21 −4 | src/glkote/web/metrics.ts | |
+11 −1 | src/glkote/web/shared.ts | |
+3 −12 | src/glkote/web/web.ts | |
+15 −1 | src/glkote/web/windows.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters