Skip to content

Commit

Permalink
fix(events): ios OSK resizes body (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-rr committed May 14, 2023
1 parent e2108e5 commit 0fc6fac
Show file tree
Hide file tree
Showing 16 changed files with 43 additions and 50 deletions.
6 changes: 3 additions & 3 deletions dist/core/index.js

Large diffs are not rendered by default.

15 changes: 6 additions & 9 deletions dist/cupertino-pane.esm.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/**
* Cupertino Pane 1.3.2
* Cupertino Pane 1.3.21
* New generation interfaces for web3 progressive applications
* https://github.com/roman-rr/cupertino-pane/
*
* Copyright 2019-2023 Roman Antonov (roman-rr)
*
* Released under the MIT License
*
* Released on: May 13, 2023
* Released on: May 14, 2023
*/

/******************************************************************************
Expand Down Expand Up @@ -629,9 +629,7 @@ class Events {
if (!this.isOnViewport()) {
return;
}
if (this.device.android) {
this.fixAndroidResize(false);
}
this.fixBodyKeyboardResize(false);
this.keyboardVisible = false;
// Clear
this.inputBottomOffset = 0;
Expand All @@ -656,9 +654,7 @@ class Events {
// We should separate keyboard and resize events
if (this.isKeyboardEvent()) {
// Android resize fixes
if (this.device.android) {
this.fixAndroidResize(true);
}
this.fixBodyKeyboardResize(true);
// Cordova & PWA iOS
if (this.device.cordova
|| this.device.ios) {
Expand Down Expand Up @@ -755,12 +751,13 @@ class Events {
return prevention;
}
/**
* TODO: Check also document.body resizing for iOS/Chrome
* Fix OSK
* https://developer.chrome.com/blog/viewport-resize-behavior/
* Chrome 108+ will adjust with content-overlays
* When everyones updates, can be replaced with adding content-overlays to meta
*/
fixAndroidResize(showKeyboard) {
fixBodyKeyboardResize(showKeyboard) {
if (!this.instance.paneEl)
return;
const metaViewport = document.querySelector('meta[name=viewport]');
Expand Down
6 changes: 3 additions & 3 deletions dist/cupertino-pane.esm.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cupertino-pane.esm.min.js.map

Large diffs are not rendered by default.

15 changes: 6 additions & 9 deletions dist/cupertino-pane.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cupertino-pane.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/cupertino-pane.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/modules/backdrop.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/modules/fit-height.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/modules/follower.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0fc6fac

Please sign in to comment.