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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Fix strange behavior after a closing modal restores focus on the Editor #1142

Closed
wants to merge 1 commit into from

Conversation

mirka
Copy link
Member

@mirka mirka commented Jan 9, 2019

Closes #1134

Yet unaddressed problem: After programmatically restoring focus, the Draft.js editor somehow stops updating its SelectionState. Further clicks in the Editor do not emit change events. The visible caret and the internal SelectionState remains out of sync until a new EditorState is created. This may be a Draft.js bug.

If there is no workaround, we may have to either:

a. Disable the shouldReturnFocusAfterClose on react-modal Modals 馃槵
b. Reimplement the shouldReturnFocusAfterClose behavior so it works with Draft.js 馃槵馃槵

@mirka mirka mentioned this pull request Jan 24, 2019
3 tasks
@belcherj belcherj changed the base branch from master to develop June 12, 2019 20:31
@belcherj
Copy link
Contributor

Clicking into the editor after modal close appears to be firing events. Closing for now.

@belcherj belcherj closed this Oct 16, 2019
@belcherj belcherj deleted the fix/modal-close-editor-cursor branch October 16, 2019 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Opening 'Preferences' leads to strange cursor behaviour, unwanted and strange duplicating of typed text
2 participants