Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Rich Text: Add missing deprecated set focused element prop. #17421
This PR fixes backwards compatibility issues that came with the unintentional removal of the
It does this by adding the prop back in with a deprecation message.
How has this been tested?
The issues in #17405 were verified to be resolved.
Types of Changes
Bug Fix: Fix backwards compatibility issues arising from accidentally removing the deprecated
However, please consider #17405 is a broader issue and there are other things to address before it can be called "fixed". It's not related to a specific plugin: other plugins may break as well and I'd tend to think there's the need to explore potential additional problems a bit more in depth. I'd like to ask you to not close #17405 when this PR will be merged.
As mentioned in #17405, at the very least:
Aside: on this PR, I'm seeing keyboard navigation with the Tab key is completely broken on the Yoast SEO blocks. It's not possible to Tab away from a block and something triggers a very bad behavior: focus gets moved automatically through blocks in a sort of infinite loop. See attached animated GIF where I'm using a red outline to highlight where focus is.
Note the GIF frame rate alters a bit what really happens visually (seen live, the loop is much faster).
I think this terrible behavior is related to incompatibility between the Gutenberg new edit/navigation modes and the Yoast blocks internal focus management mechanism. Not 100% sure though, will investigate further.
Thanks both for your work, testing and identifying the regressions.
I've done a quick audit of the component and I've noticed that
I tried tracking the unstable props but AFAIK, these are unstable props for the new wp.richText.RichText component which is a completely new component that didn't exist in WP 5.2. The wrapper component (the wp.blockEditor.RichText) has the same props (aside the exceptions above).
It is very hard to confirm though, because it's not easy to navigate the history of that component, so I'd appreciate a confirmation from @ellatrix
Not quite following. What do you want to track?
I can add it or we can add a note... Either using CSS to force the placeholder to display on focus.