-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: deleting the last block triggers a focus loss. (#14189)
## Description This PR fixes a problem: if the post contains one block and it is removed the focus is lost. This is a regression that happened when removeBlocks action was refactored to be a generator. We had an effect that inserts the default block during remove blocks action when certain conditions are met, this effect stopped working. This PR removes the effect and makes sure everything is handled by the removeBlocks action creator. End to end test available at #14191. ## How has this been tested? I created a new post. I wrote something in a paragraph I removed the paragraph using the remove button in the side menu and I verified the default block was added.
- Loading branch information
1 parent
4a05fa4
commit b49fcbb
Showing
3 changed files
with
25 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters