Coder Social home page Coder Social logo

Comments (8)

Prinzhorn avatar Prinzhorn commented on August 13, 2024

Please include the unminified sources. It's impossible to debug otherwise.

By the way it doesn't happen in Firefox for me, only Chrome.

from skrollr-menu.

sdawson26 avatar sdawson26 commented on August 13, 2024

Prinzhorn,

Sorry about that. I've updated both Skrollr and Skrollr-menu to unminified.

Here is the file I'm calling the init from:

http://prbbi.com/js/pr/pr-footer.js

from skrollr-menu.

Prinzhorn avatar Prinzhorn commented on August 13, 2024

This was introduced by ebb39bba#diff-14e11108e3fcf79bc01a46d211744495R141

I'm not sure though why I thought it would be a good idea to fall back to 0 when the popstate event doesn't deliver any data. For some reason Chrome does fire a popstate when the page loads. I'm not sure about the consequences of ignoring popstate events which lack skrollr-menu specific data (which are the the counterpart to a skrollr-menu triggered pushstate).

from skrollr-menu.

Prinzhorn avatar Prinzhorn commented on August 13, 2024

Reading through #3 again maybe http://stackoverflow.com/questions/10742422/prevent-browser-scroll-on-html5-history-popstate was the reason for that. Because if I remove that code, then Chrome will scroll to the anchor by itself, which is not desired especially on mobile where this would break the page...

from skrollr-menu.

Prinzhorn avatar Prinzhorn commented on August 13, 2024

I'd need to take a closer look at this, but I'm busy. Maybe someone can play around with it and see what happens if the popstate is ignored, if it doesn't contain skrollr data.

from skrollr-menu.

ir-Sindaco avatar ir-Sindaco commented on August 13, 2024

I am having the same exact issue, but i am not good enough to work out a solution. Hope someone can find a workaround soon!
edit: btw i am on a very tight schedule and need a fix asap (i would also gladly donate for the work if needed!)
i got some results simply by deleting the word "popstate" in the script, but then i get this: when clicking on an anchor from the first page menu (like productivity-and-performance-services.php#tire-pressure) i get to the correct section in the second page, but if i am already on the 2nd page and click the same link "productivity-and-performance-services.php#tire-pressure" it gets to a wrong position... while having a link and clicking #tire-pressure on the same 2nd page would work ok.
I could find a workaround to this as well (different links on different pages, so when i am on the 2nd page the menu links will point just to the #tire-pressure and not to the full productivity-and-performance-services.php#tire-pressure link) but there must be a better way. Also removing "popstate" might have side effects i am not aware of.
..hope i explained well enough!

from skrollr-menu.

eudes avatar eudes commented on August 13, 2024

Same issue here: http://eudes.es/nova/test/index.html#organizar-evento
When loaded, page jumps to hash and immeditely afterwards jumps to the top.
Also, on mobile chrome there's a different issue:
When loaded the page jumps to hash, but you can't scroll up from there, only down. The size of the frame is the usual (whole page), but on the top of the page is the hashed position so you have half a blank page from the footer down.

from skrollr-menu.

tslatt avatar tslatt commented on August 13, 2024

Has anyone found a solution yet?

from skrollr-menu.

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.