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

Updated blockSelection reducer to clear selection if we are removing the selected block #5642

Merged
merged 1 commit into from Mar 21, 2018

Conversation

Projects
None yet
2 participants
@jorgefilipecosta
Member

jorgefilipecosta commented Mar 15, 2018

When we removed blocks the selection stayed the same, so in the most common case where we remove the selected block the selection becomes invalid.
This had to noticeable issue #5446 where if we insert a block, after removing another one the block is inserted at the top of the document.
After this PR the block is inserted at the end. In my option, this is still not the best behavior and PR #5568 makes use of effects to insert the block in the same position of the removed block.
But even if we decide on the other approach, this change is still valid and the problem in the reducer in to be addressed.

How Has This Been Tested?

Verify it is still possible to remove and add blocks.
Remove a block in the middle of the document. Insert a new block, verify it is inserted at the end.

@aduth

aduth approved these changes Mar 20, 2018

👍

@jorgefilipecosta jorgefilipecosta merged commit 2039ccb into master Mar 21, 2018

2 checks passed

codecov/project 40.5% (+0.02%) compared to a3776ed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jorgefilipecosta jorgefilipecosta deleted the fix/unselect-on-remove branch Mar 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment