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

Do not focus or blur editor of it is already focussed or blurred #1104

Merged
merged 1 commit into from
Jun 13, 2017

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Jun 10, 2017

I am seeing some strange things with selection inside an Editable.

  • Select a piece of text, then click in the Editable. Expected: caret moves to selected position. Actual result: selection is kept (though quickly disappears, then comes back).
  • Sometimes, pressing to pointer to select text, and moving it, the caret moves with the pointer instead of starting a selection. I can't reproduce this consistently, but certainly happens when you try a few times.

Both if these issues seem to be caused by us continuously focussing the editor even though it is already focussed. To fix this, we should only update the focus/selection when it is necessary.

@ellatrix ellatrix self-assigned this Jun 10, 2017
@ellatrix ellatrix added the [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable label Jun 10, 2017
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

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

This PR seems to fix a lot of selection issues, nice work 👍

@ellatrix ellatrix merged commit 43b85f3 into master Jun 13, 2017
@ellatrix ellatrix deleted the fix/editable-focus branch June 13, 2017 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants