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

RichText: Add a method to manage focus #12587

Closed
afercia opened this issue Dec 4, 2018 · 3 comments
Closed

RichText: Add a method to manage focus #12587

afercia opened this issue Dec 4, 2018 · 3 comments
Labels
[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes).

Comments

@afercia
Copy link
Contributor

afercia commented Dec 4, 2018

Looks like with the removal of unstableOnSetup in #10744 there isn't a built-in way to manage focus on the RichText editable area any longer.

Managing focus is essential in some flows, especially for custom block types with multiple RichText instances. While the removal of unstableOnSetup was expected to happen without notice, a new, alternative, method was expected as well.

Other editors expose a focus method: for example, Draft.js explains very well why this is needed, see https://draftjs.org/docs/advanced-topics-managing-focus

Discussed a bit this issue with our technical team at Yoast and we'd tend to think that also all use-cases that were offered by a reference to TinyMCE would need to be offered by the wrapper, RichText in this case.

@afercia afercia added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable labels Dec 4, 2018
@atimmer atimmer changed the title RichText: consider a new method to manage focus RichText: Add a method to manage focus Dec 4, 2018
@atimmer
Copy link
Member

atimmer commented Dec 4, 2018

I think this is essential functionality for an editable field component, which RichText is. I understand the choice to not expose the TinyMCE instance, but focusing an editable field is core functionality.

@ellatrix
Copy link
Member

ellatrix commented Dec 5, 2018

What's the difference with #9740?

@afercia
Copy link
Contributor Author

afercia commented Dec 5, 2018

The difference is I forgot #9740 existed 🙂

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 [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes).
Projects
None yet
Development

No branches or pull requests

3 participants