Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work correctly in a PWA standalone web app #29

Open
jarmo opened this issue Jul 28, 2020 · 2 comments
Open

Does not work correctly in a PWA standalone web app #29

jarmo opened this issue Jul 28, 2020 · 2 comments

Comments

@jarmo
Copy link

jarmo commented Jul 28, 2020

When having a PWA standalone app (display property value is standalone in manifest.json as written in here https://developer.mozilla.org/en-US/docs/Web/Manifest/display) then this library does not work as expected - since address bar does not exist then things are calculated incorrectly.

@laygir
Copy link

laygir commented Mar 11, 2024

Also having this issue, inspecting from Safari, on the initial load of the page, there is no --vh-offset var in the style attribute of the html tag. After I refresh the page from the web inspector of Safari, then the --vh-offset becomes available.

vh-check-pwa.mov

@laygir
Copy link

laygir commented Mar 11, 2024

This seems to solve the issue, at least so far.

document.addEventListener('DOMContentLoaded', () => {
  vhCheck();
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants