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
Scroll to component button #478
Conversation
@@ -587,7 +591,7 @@ function processObservables (instance) { | |||
function scrollIntoView (instance) { | |||
const rect = getInstanceRect(instance) | |||
if (rect) { | |||
window.scrollBy(0, rect.top) | |||
window.scrollBy(0, rect.top + (rect.height - window.innerHeight) / 2) |
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.
making it appear in the middle of the screen is pretty neat actually, It did bother me sometimes (toolbars haha) when it scrolls to the very top
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.
haha it's exactly why I came across this because clicking on a component makes it auto scroll to the top (and behind my fixed navigation).
Not sure how to change this though (and I feel like it's a new change?)
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.
Not sure how to change this though (and I feel like it's a new change?)
What do you mean? 😕
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.
We have a component that's often taller then the screen, so when it scrolls to the middle, it's a bit odd. It would be good to scroll to middle for smaller components, but scroll to top for components taller than the screen height.
Fix #235