Giter VIP home page Giter VIP logo

Comments (14)

torkiljohnsen avatar torkiljohnsen commented on August 16, 2024

@terryupton I tested http://bit.ly/offcanvas4 on both Safari and Chrome on iOS 7.1.2 on my iPhone 4, and was unable to reproduce this error. I tried both changing orientation with the menu open and the menu closed.

from responsive-off-canvas-menu.

terryupton avatar terryupton commented on August 16, 2024

@torkiljohnsen Interesting. I will do some further testing. I will try get my hands on some other devices. I am also on IOS 7.1.2 and also tested in both Safari and Chrome.

Here is the exact steps I took.

  1. Open website in portrait mode
  2. Then open the menu, and then close the menu
  3. Change the phone orientation to landscape
  4. Then open the menu, and then close the menu.
  5. Change the phone orientation back to portrait
  6. this should cause the issue explained above.

I have just check this again.
Can you confirm these steps and if it occurs for you...?

from responsive-off-canvas-menu.

 avatar commented on August 16, 2024

I also can confirm this

from responsive-off-canvas-menu.

torkiljohnsen avatar torkiljohnsen commented on August 16, 2024

Yes, I can see the error now—in both browsers—and also with fewer steps:

  1. Open the site in landscape mode
  2. Open and close the menu
  3. Switch to portrait mode

from responsive-off-canvas-menu.

terryupton avatar terryupton commented on August 16, 2024

Thanks for confirming @torkiljohnsen and @corvannoorloos - any ideas what causes this or how to potentially resolve it?

from responsive-off-canvas-menu.

torkiljohnsen avatar torkiljohnsen commented on August 16, 2024

The problem seems to be the #nav element overlapping the rest of the content.

I tested a z-index change with success in the Safari inspector:
For the selector #nav:not(:target), set z-index: -1.

Could you test that out?

from responsive-off-canvas-menu.

torkiljohnsen avatar torkiljohnsen commented on August 16, 2024

@dbushell Are you maintaining this repo, or should we fork away somewhere? :)

from responsive-off-canvas-menu.

terryupton avatar terryupton commented on August 16, 2024

Thanks @torkiljohnsen - yes swapping this to z-index:-1; does the trick. Seems to all still function ok.

from responsive-off-canvas-menu.

torkiljohnsen avatar torkiljohnsen commented on August 16, 2024

I don't know why this happens, so the issue is still a bit of a mystery. The code change only places the nav at a lower z-index when it's not targeted.

If you don't have any other DOM elements with id="nav", which you shouldn't, you're fine.

from responsive-off-canvas-menu.

michaelwoodruff avatar michaelwoodruff commented on August 16, 2024

I have experienced this issue as well with iOS 8.1.1 on an iPhone 5s.

I’ll try and solve it by "swapping this to z-index:-1;”.

off-canvas

from responsive-off-canvas-menu.

terryupton avatar terryupton commented on August 16, 2024

This bug seems to be back in iOS 8.1.1 and 8.1.2 - anyone else seeing this or got a further resolution?

from responsive-off-canvas-menu.

torkiljohnsen avatar torkiljohnsen commented on August 16, 2024

I am not experiencing this bug on iOS 8.1.2, Safari. All is well here.

from responsive-off-canvas-menu.

torkiljohnsen avatar torkiljohnsen commented on August 16, 2024

I propose trying this solution instead:
http://jsfiddle.net/Sbt75/49/

from responsive-off-canvas-menu.

nousheen avatar nousheen commented on August 16, 2024

I had the same problem ... had to fix it with javascript code

window.addEventListener('orientationchange', function () {
    var originalBodyStyle = getComputedStyle(document.body).getPropertyValue('display');
    document.body.style.display = 'none';
    setTimeout(function () {
        document.body.style.display = originalBodyStyle;
    }, 10);
});

Ref: http://stackoverflow.com/questions/7919172/what-is-the-best-method-of-re-rendering-a-web-page-on-orientation-change

from responsive-off-canvas-menu.

Related Issues (19)

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.