Tinacms: Scrolling issues with inline editing

Created on 19 Feb 2020  ·  3Comments  ·  Source: tinacms/tinacms

Given I have a long content
When I'm inline-editing my content
Then sometimes editor scrolls to top

Reproduced on the current master branch when using the demo-gatsby package.

Also reported by @PaulBunker on Slack.

bug ux

Most helpful comment

I'm also having this issue.
I've made a CodeSandbox to demonstrate.

All 3 comments

New information that might help finding the cause

So...
I've removed the wysiwyg from my page and replaced it with a custom textarea field.
I have smooth-scrolling on the document enabled.
When I edited text, the page would scroll from the top down to the cursor.
_I fixed this by disabling the smooth-scrolling while in edit mode. I get the scrollbar flashing as I type but I can live with this for now_

hypothesis

The contents of the textarea is being removed then replaced by final form leading to the cursor jumping to the top of the screen and the page scrolls with it as the text is replaced and the cursor returned magically to the right place 🤷🏼‍♂️ the page scrolls the cursor into view.

I still think the other issue is related but I don't think this is a WYSIWYM issue I think its a final form problem perhaps

I'm also having this issue.
I've made a CodeSandbox to demonstrate.

Was this page helpful?
0 / 5 - 0 ratings