Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Disabling cursorToEnd? #33

Open
Gnopps opened this issue Jul 19, 2019 · 3 comments
Open

Disabling cursorToEnd? #33

Gnopps opened this issue Jul 19, 2019 · 3 comments

Comments

@Gnopps
Copy link

Gnopps commented Jul 19, 2019

Version

1.1.1

Test Environment

Firefox, Win10

Current Behavior

When I have markdown enabled as default in the editor then the window will automatically scroll to show the editor (if it needs to be scrolled to, to be seen). If I have WYSIWYG enabled as default then the window will not scroll to the editor.

My guess would be that cursorToEnd is true by default. How can I disable this?

Expected Behavior

I'd like the window not to scroll to the editor's position unless I ask it to.

@sohee-lee7
Copy link
Contributor

I did not really understand your issue. Does scrolling automatically scroll to where the editor is? Or does the editor have an initial content and scroll to the end of the content?

@Gnopps
Copy link
Author

Gnopps commented Jul 22, 2019

Does scrolling automatically scroll to where the editor is?

Yes, it seems that the page automatically shows the editor when you have markdown enabled. It does not focus on the editor, just shows it.

Or does the editor have an initial content and scroll to the end of the content?

Yes here as well. The editor does have initial content and when shown in markdown-mode problem occurs. The problem does not occur in WYSIWYG-mode.

@espresso-woozy
Copy link

We do have the same issue when using the editor with a v-model. When the value of the editor is changed from the outside (e.g. when the database query is finished) the watcher for value triggers setValue() of the JS component with cursorToEnd = true. This causes the JS component to set the cursor which also scrolls down the page if the editor is not within the viewport.

Would it make sense to just pass cursorToEnd = false as default? That fixes it for me locally.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants