hydrogen-web/scripts
Johannes Marbach 14ed5fd1e8 Manually adapt UI when keyboard shows or hides on mobile Safari
Mobile Safari seems to be the only browser that does *not* resize the
viewport when the keyboard shows and hides. Instead the window is moved
to make room for the keyboard which moves content at the top off screen.

This uses the VisualViewport API to manually resize the `SessionView`
in response to keyboard display events. Additionally, if a DOM element
exists that has the `bottom-aligned-scroll` CSS class, its scroll
position is retained. Currently this only applies to the `Timeline`.

Note that the VisualViewport API was only introduced with iOS 13.
According to [statista.com], versions below 13 made up for 19% of
all iOS users in summer 2020, with the share continuing to fall off.
As a result, this seems like an acceptable workaround.

Fixes: #181

[statista.com]: https://www.statista.com/statistics/565270/apple-devices-ios-version-share-worldwide/

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2021-03-26 08:29:33 +01:00
..
logviewer better time formatting and overlap logging in log viewer 2021-02-24 20:56:36 +01:00
package-overrides add bs58 as a dependency 2020-09-16 18:31:16 +02:00
build.mjs Manually adapt UI when keyboard shows or hides on mobile Safari 2021-03-26 08:29:33 +01:00
common.mjs populate lib dir entirely in postinstall script 2020-08-27 19:51:04 +02:00
deploy.sh deploy script for now 2020-08-14 15:20:36 +02:00
package.sh add package script 2020-08-18 12:17:03 +02:00
post-install.js convert post-install script to CJS so we can use require.resolve 2021-03-08 14:40:21 +01:00
release.sh release script 2020-03-21 11:32:37 +01:00
serve-local.js log requests to dev server 2020-10-05 15:10:15 +02:00