Comments (6)
Hi,
Thank you for using this lib and thanks for reporting this issue.
I can effectively reproduce this behavior on chrome V69.0.3497.105 for ios & firefox ios…
It's ok with Safari, Chrome & Firefox for android…
I'll try to fix that tomorrow
from vh-check.
Awesome, I can confirm the same behavior. Thanks for the quick response and turnaround!
from vh-check.
@nikse In fact it's working.
In those browsers the vh
unit reevaluate on scroll:
- so the initial 100vh are matching the visible content
- so the lib doesn't see any size difference
- so it returns a
no-needed
I've
- detailed the readme about this.
- updated the demo to see better what's going on.
Is this ok for you?
from vh-check.
Ah, interesting yeah that explains it. Though, I will say this is still undesirable behavior from the browser. I'm wondering if an event or anything is fired once the address bar is removed/added and the vh could be set to the max of either of those or if you can think of any other alternative for the current ios chrome/firefox behavior
from vh-check.
I don't know about such events.
I think it's more a bug than a real feature. They should align with all the other behavior.
Still if you want to override that you should be able to to do something like that:
vhCheck({
bind: false,
redefineVh: true,
})
.my-div {
height: calc(var(--vh, 1vh) * 100)
}
--vh
will be defined once at load time and will not reevaluate on scroll
from vh-check.
thanks!
from vh-check.
Related Issues (20)
- Publish actual code to NPM HOT 4
- NPM – shouldn't have .vscode folder published on npm
- Doesn't apply to Chrome / Android HOT 2
- should allow another way of computing the size
- calling multiple times vhCheck() will bind multiple time the orientationchange event
- Value changes on zoom HOT 5
- IE11 - Object doesn't support property or method 'assign' HOT 3
- TESTS – add for real browsers starting at IE11
- Issues with TypeScript HOT 5
- Help: How can I use it with sass or vue? HOT 2
- Docs: bind boolean value HOT 1
- Get if the bottom bar is opened or closed HOT 4
- updateOnTouch only works when i touch again HOT 1
- Doesn't seem to work on Iphone X HOT 5
- Does not work in iOS Chrome HOT 1
- isNeeded = false for iPhone/Safari when target=_blank HOT 2
- Bottom gap on mobile Firefox
- Does not work correctly in a PWA standalone web app HOT 2
- All iphone phones with full screen cannot use this set of plug-ins.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vh-check.