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

Undoing back to zero loses selection #709

Merged
merged 2 commits into from Apr 21, 2015
Merged

Undoing back to zero loses selection #709

merged 2 commits into from Apr 21, 2015

Conversation

mightyiam
Copy link
Contributor

Instantiate object-history on body focus

@@ -22,10 +22,6 @@ WYMeditor.UndoRedo = function (wym) {

undoRedo.wym = wym;

// https://github.com/mightyiam/object-history
undoRedo.history = new WYMeditor.EXTERNAL_MODULES
.ObjectHistory(wym.getCurrentState());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This always produces a first undo point that is lacking selection.

That means that when undoing all the way back to the first point makes the selection go away, meaning the user must place the caret in order to type characters again.

@mightyiam
Copy link
Contributor Author

In tests that test undo/redo, a focusOnDocument can help.

In manipulationTestHelper a wym.undoRedo.reset call results in a (re)initialization of object-history.

@winhamwr winhamwr changed the title Instantiate object-history on body focus Undoing back to zero loses selection Apr 21, 2015
winhamwr added a commit that referenced this pull request Apr 21, 2015
Undoing back to zero loses selection
@winhamwr winhamwr merged commit e91ee98 into master Apr 21, 2015
@winhamwr winhamwr deleted the issue_706 branch April 21, 2015 21:39
@mightyiam
Copy link
Contributor Author

Thank you!

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

Successfully merging this pull request may close these issues.

None yet

2 participants