-
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
[Mobile] - Fix crash when switching to the HTML Editor #51650
Conversation
…t was focused on a block since it was calling clearSelectedBlock twice.
Size Change: 0 B Total Size: 1.4 MB ℹ️ View Unchanged
|
Flaky tests detected in dbb3fe0. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5311893734
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this so quickly, and the test! The test plan succeeded for me on an iPhone 14 Pro simulator and a Samsung Galaxy S20 5G FE.
My understanding is that commit uncovering this issue, 1c4bd99, has not yet shipped in a mobile release. So, we do not need to ship this fix in a beta or hot fix. 👍🏻
Thank you for reviewing and testing! 🙇
That's correct, this change was merged back on June 8th, and the last commit in the |
* Mobile - HTML Editor - Fix an issue where the editor would crash if it was focused on a block since it was calling clearSelectedBlock twice. * Mobile - Editor test - Update test to use toBeVisible instead
Related PRS:
What?
This PR fixes a regression after #51051 was merged.
Why?
Within
toggleMode
we were callingclearSelectedBlock
but this is already being called within switchEditorMode.It appears that now that we have stable references from #51051 it surfaced this issue when it tries to clear a block when it was already cleared.
How?
By removing the extra
clearSelectedBlock
. It also introduces an integration test to make sure we test the HTML editor opens.Testing Instructions
CI checks should pass in this PR and in the Gutenberg mobile PR.
Testing Instructions for Keyboard
N/A
Screenshots or screencast
Bug.mov
BugAfter.mov