-
Notifications
You must be signed in to change notification settings - Fork 151
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
error when typing after inserting card via button #286
Milestone
Comments
Merged
bantic
added a commit
to bustle/ember-mobiledoc-editor
that referenced
this issue
Jan 11, 2016
Fixes bustle/mobiledoc-kit#286 If the range is not set explicitly, the browser page can end up in a state where: * the document.activeElement is outside the editor element (it's the button that the user clicked on to add the card) * the window.getSelection() is still inside the editor element * on the next keystroke, the browser will insert text into the contenteditable editor element at the selection, but only the mutation observer listeners will fire. This can result in an un-mapped text node being added to the mobiledoc editor, which causes errors to be thrown
bantic
added a commit
to bustle/ember-mobiledoc-editor
that referenced
this issue
Jan 11, 2016
Fixes bustle/mobiledoc-kit#286 If the range is not set explicitly, the browser page can end up in a state where: * the document.activeElement is outside the editor element (it's the button that the user clicked on to add the card) * the window.getSelection() is still inside the editor element * on the next keystroke, the browser will insert text into the contenteditable editor element at the selection, but only the mutation observer listeners will fire. This can result in an un-mapped text node being added to the mobiledoc editor, which causes errors to be thrown
bantic
added a commit
to bustle/ember-mobiledoc-editor
that referenced
this issue
Jan 11, 2016
Fixes bustle/mobiledoc-kit#286 If the range is not set explicitly, the browser page can end up in a state where: * the document.activeElement is outside the editor element (it's the button that the user clicked on to add the card) * the window.getSelection() is still inside the editor element * on the next keystroke, the browser will insert text into the contenteditable editor element at the selection, but only the mutation observer listeners will fire. This can result in an un-mapped text node being added to the mobiledoc editor, which causes errors to be thrown
bantic
added a commit
to bustle/ember-mobiledoc-editor
that referenced
this issue
Jan 11, 2016
Fixes bustle/mobiledoc-kit#286 If the range is not set explicitly, the browser page can end up in a state where: * the document.activeElement is outside the editor element (it's the button that the user clicked on to add the card) * the window.getSelection() is still inside the editor element * on the next keystroke, the browser will insert text into the contenteditable editor element at the selection, but only the mutation observer listeners will fire. This can result in an un-mapped text node being added to the mobiledoc editor, which causes errors to be thrown
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Similar to #285.
After inserting a card via a button click, the button is the
activeElement
and the window's selection is focused on the div of the section where the cursor had been, rather than focused inside its text node.As a result, typing a key causes an error "could not find parent section for un-mapped text node".
To reproduce in the demo:
The text was updated successfully, but these errors were encountered: