-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Undo manager should wrap reinserted text #509
Comments
I think an acceptable heuristic is just wrap reinserted text that was deleted? Also what do you mean by forwards or backwards? |
Backwards mean the selection start from the right, and end to the left (by Shift + Left). The difference compare to forwards is after we do a backwards selection, we press Shift + Left again then the selection should expand to the left. Currently quill.setSelection cannot do that, I have to write quill.prototype.setBackwardSelection for my case. |
Wrap reinserted text is ok, but the undo manager is not doing right in other case also so I think the implementation of Can you explain the implementation of |
I just noticed this behavior too.
I think I'd amend this to make it more precise by saying: if the last op of the original delta was a highlight-and-delete, then the restored characters should be selected when that delta is un-done. The problem is, it's impossible to know whether a |
@jhchen I encountered another reason for the clipboard module to track the selection history. I have a key binding set up to turn I have more similar keybindings to accomplish the same for My key bindings insert the space first, before calling Right now, the act of undoing the change from |
Selection UX is really bad. For example when we select text to delete, then we undo after deleting, the selection should wrap that text (also be forwards or backwards if needed). I think we should store selection to stacks also.
The text was updated successfully, but these errors were encountered: