-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 no longer works with the onFocus event #32415
Comments
@ellatrix I hope you don't mind if I ping you on this – I believe you've been actively working on RichText. |
Hi @lukecarbis As there hasn’t been any movement on this issue since it was opened, I’ve marked it as stale. Let me know if you think it should be kept open. Thanks! |
@lukecarbis just checking in. Would you be able to test with the latest version of the |
@ndiego Yes – I'll do so today. |
@ndiego After updating the code in the original sandbox to work with React 18, and using the latest version of all included scripts, this problem is still not fixed. Sandbox using Let me know if there's anything further that you need. |
Awesome, thanks for confirming @lukecarbis! |
Does #47685 fix this? |
@ellatrix Yes, it does! |
Description
In WordPress 5.7.2 (without the plugin), a RichText component can be passed the
onFocus
event, and it works as expected. Activating Gutenberg 10.7.1 breaks the onFocus functionality.Step-by-step reproduction instructions
Alternatively, here's a sandbox:
https://codesandbox.io/s/wp-richtext-onfocus-test-6r1eh?file=/src/App.js
@wordpress/block-editor
requirement to 6.1.1 or 6.1.0onFocus
doesn't fire, andonBlur
does@wordpress/block-editor
requirement to 6.0.0onFocus
fires, andonBlur
doesn'tExpected behaviour
RichText fields should trigger a given onFocus event when they receive focus.
Actual behaviour
RichText fields no longer trigger onFocus events (though they once did).
Code snippet (optional)
https://codesandbox.io/s/wp-richtext-onfocus-test-6r1eh?file=/src/App.js
WordPress information
Device information
The text was updated successfully, but these errors were encountered: