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.

Jumpy editor behavior in scrollable container

See original GitHub issue

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

bug

What’s the current behavior?

Editor jumps up and down when it is placed inside a scrollable container. This issue is different from other issues previously reported because they all target older versions of Slate. GIF: https://share.getcloudapp.com/7KuyN5zo

Slate: 0.57.1 Browser: Chrome OS: Windows

What’s the expected behavior?

Slate should scroll inside its container and not scroll the parent container.

Possible Reason

Slate 0.50+ seems to be using https://github.com/stipsan/scroll-into-view-if-needed in order to bring selected view into focus. Scroll-into-view have a property boundary which allows us to define a parent element inside which it should position the item… This parameter seems to be missing here https://github.com/ianstormtaylor/slate/blob/e54b07eba8ab23a8c26b275f77e8ec207f8c9b55/packages/slate-react/src/components/editable.tsx#L197 and it causes the parent container to scroll along with editor. This issue can be reproduced on the official site for said library here (https://scroll-into-view-if-needed.netlify.com/) if you disable the boundry check box next to Limit propagation you’ll see it scrolls the whole document when positioning the element.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
zswcatcommented, May 7, 2020

Anxiously waiting.I’m also experiencing this

1reaction
mitchellbusbycommented, May 4, 2020

Don’t want to pile on this thread but the above commit (1652eca) fixes my experience of this bug locally quite nicely.

Read more comments on GitHub >

github_iconTop Results From Across the Web

overscroll-behavior - CSS: Cascading Style Sheets | MDN
The overscroll-behavior CSS property sets what a browser does when reaching the boundary of a scrolling area.
Read more >
overscroll-behavior | CSS-Tricks
The overscroll-behavior CSS property controls whether an element will use “scroll chaining” or not. You have likely experienced this ...
Read more >
How To Create Revealing More Content Effect While Scrolling
How to Design a Sticky Scrolling Pizza Effect in Editor X · How to create an Infinity Rotation Animation in One Minute |...
Read more >
Scrolling in text editor is flickering and jump up and down
A fix for this issue has been released! Install the most recent release from https://visualstudio.microsoft.com/downloads/ .
Read more >
Changing scrollbar behavior – IDEs Support (IntelliJ Platform)
If I hover over that with my mouse, I see a code snippet at that location. If I click anywhere in that area,...
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