Giter Site home page Giter Site logo

Not working on new chrome ios about vh-check HOT 6 CLOSED

hiswe avatar hiswe commented on June 3, 2024
Not working on new chrome ios

from vh-check.

Comments (6)

Hiswe avatar Hiswe commented on June 3, 2024

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.

nikse avatar nikse commented on June 3, 2024

Awesome, I can confirm the same behavior. Thanks for the quick response and turnaround!

from vh-check.

Hiswe avatar Hiswe commented on June 3, 2024

@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

Is this ok for you?

from vh-check.

nikse avatar nikse commented on June 3, 2024

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.

Hiswe avatar Hiswe commented on June 3, 2024

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.

nikse avatar nikse commented on June 3, 2024

thanks!

from vh-check.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.