question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

scroll-to-selection: doesn't scroll all the way down

See original GitHub issue

Do you want to request a feature or report a bug?

Bug

What’s the current behavior?

It doesn’t scroll all the way down: Before

It should scroll all the way down: After

The problem seems to be here:

https://github.com/ianstormtaylor/slate/blob/master/packages/slate-react/src/utils/scroll-to-selection.js#L120

const selectionFocusTop = backward ? selectionRect.top : selectionRect.bottom

Should be the other away:

const selectionFocusTop = backward ? selectionRect.bottom : selectionRect.top

EDIT: updated proposal to fix

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
echenleycommented, Dec 8, 2017

Okay, I’ll take a look. Thanks for the bug report.

0reactions
skogsmaskincommented, Dec 8, 2017

Let’s discuss this further in https://github.com/ianstormtaylor/slate/pull/1462.

Closing this as @echenley 's PR makes an acceptable solution to this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML Scrolling to section doesn't scroll all the way down
I want my buttons on my navbar to scroll to a certain section, but it doesn't scroll all the way down, and it...
Read more >
ScrollViewProxy scrollTo will cras… | Apple Developer Forums
ScrollViewProxy scrollTo will crash when scrolling outside of bounds of previous (not current) List data source/array in iPad and iOS 16 beta.
Read more >
Prototype scrolling with overflow behavior - Figma Help Center
Vertical scrolling allows users to swipe or scroll up and down within a frame. Use this behavior to mimic scrolling down a long...
Read more >
Window scrollTo() Method - W3Schools
For the scrollTo() method to work, the document must be larger than the screen, and the scrollbar must be visible. See Also: The...
Read more >
Element.scrollIntoView() - Web APIs | MDN
The Element interface's scrollIntoView() method scrolls the element's ancestor containers such that the element on which scrollIntoView() is ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found