-
Notifications
You must be signed in to change notification settings - Fork 326
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
Get external link and scroll to element #3506
Conversation
…existence checks, and update scrollIntoView behavior"
…ed useEffect hooks, and simplified getPageContainingElement function."
Now also works with page ids Could use a deployment. |
…n useEffect and scrollToPage function"
…ent functions, instead getting iframe element by id 'BrewRenderer' inside the functions."
How should this be tested? |
Go ahead and open any brew and append the bookmark: You should be able to do it with any brew, with any element or page with id, as they are previously generated. |
I'm guessing you will have a lot to say about the scrolling methods, cannot remember why i did it this way. |
…nto scroll-to-element
This should be ready for merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I select an out of bounds page, this sends me to Vault instead of the Brew.
I think this should instead go to the first or last page and provide an error message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously reported error was in the testing, not the results.
`frameDidMount` is equivalent to using iframe.addEventListener('load'); Let's not add a new listener and just use the existing event we already have. Functionality still works.
Ok, just cleaned up a bit. Merging now! Thanks @5e-Cleric ! 💯 ⭐ 🎉 |
This does work, not sure it is perfect.
Instead of having to catch the exact time of load finish of the pages, the function waits 100ms before scrolling.
for this instance, i think this is appropiate, and easier to deal with.
Tested this with 90+ page doc, works fine. Unsetting smooth scroll as it triggers lots of page loads.
Closes #2820 and duplicate #3505
to test, try any brew url +
#id