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

Navigation to selector or to Top is not working from version 3.2.0 and higher #195

Open
jmarti326 opened this issue Jan 10, 2018 · 2 comments
Labels

Comments

@jmarti326
Copy link
Contributor

I am unable to see any specific difference where Trip.js 3.1.7 navigated directly to the element in your selector and why it stops working in Trip.js 3.2.0 and up. I have tried in different environments (Windows & Mac OS) and with different browsers (IE, Safari,
Chrome, Firefox, and Opera)

Went to the trip.js web page and clicked the scroll to top when finish which I imagine it uses the same function and it doesn't work either. Could this mean it was something removed intentionally from version 3.2.0 and higher or it's actually a bug?

scroll to top not working

@EragonJ
Copy link
Owner

EragonJ commented Jan 11, 2018

@jmarti326 interesting ... i think this is a bug :/ ... Will check it later if I have time, or feel free to dive into the source code if it's urgent for your project.

@EragonJ EragonJ added the bug label Jan 11, 2018
@usb248
Copy link

usb248 commented Apr 12, 2018

I confirm, it's a bug which exist since long time. #190 ....

phroggar added a commit to phroggar/Trip.js that referenced this issue Jan 3, 2019
By changing $root from body to html the scrolling is fixed ( see https://stackoverflow.com/questions/46071588/chrome-61-jquery-scrolling-not-working-anymore ). Affects EragonJ#190  and EragonJ#195 

If the sel option is used an leads to a hidden element, the positioning will not work. As a quickfix you can make sure that only visible elements are selected by adding :visible to the CSS selector. Affects EragonJ#168 

Please note that these changes have not been tested on various browsers and the ':visible' change is a bit dirty. But the changes worked for me so far and i wanted them documented for everyone else.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants