Skip to content
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

Editor text clears on undo when undo stack is empty #432

Open
JohannesMP opened this issue Nov 22, 2017 · 2 comments
Open

Editor text clears on undo when undo stack is empty #432

JohannesMP opened this issue Nov 22, 2017 · 2 comments
Labels

Comments

@JohannesMP
Copy link
Contributor

JohannesMP commented Nov 22, 2017

Description:

Performing the undo action, such as with keyboard shortcut Ctrl+Z will clear the editor text field if no other actions are on the undo stack.

I have had several times where I have an old post with lots of content, that I re-open at a later date to make a quick change, but then undo the change, only to accidentally find the entire post gone.

I understand that when in this state, I can just redo to get back to the original state of the post, but this is unintuitive, and since the post was opened in a non-empty state, performing undo should never not return me to that original state it was loaded in.

Undoing should definitely not clear the text editor completely. It is far too easy to accidentally save and lose the whole document.

Tell us a bit about yourself:

  • Version of JekyllAdmin I'm using: 0.7.0
  • Version of Jekyll I'm using: 3.6.2
  • Operating System: Windows 10
  • Browser: Chrome Version 62.0.3202.94 (Official Build) (64-bit)

Steps to reproduce:

  1. Have a post with a bunch of content
  2. Open it in the markup editor
  3. Select the post body text field
  4. CTRL+Z without typing anything -- Basically do ctrl-z when the undo stack should already be empty

All of the text in the text area will now be gone.

I expected the following:

In general, when you first open a file in a text editor, the current state of that file is considered the base state for the undo stack.

Any changes the user makes are pushed to the undo stack, and a user can undo, popping from the undo stack, until it is empty and they are once again at the original state of the document. Most text editors do not consider the empty document before it was read from disk to be a valid undo state.

Other details:

Screen capture:
jekyladminundoclear

@mertkahyaoglu
Copy link
Member

Thanks for the issue. Strange behavior of SimpleMDE 😕

@jekyllbot
Copy link

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@jekyllbot jekyllbot removed the stale label Jan 9, 2020
@jekyll jekyll deleted a comment Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants