Skip to content
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

Inserter: Fix unmodified default block replace, insert after selected #5296

Merged
merged 1 commit into from
Feb 28, 2018

Conversation

aduth
Copy link
Member

@aduth aduth commented Feb 27, 2018

Fixes #5291
Regression introduced in #5137 (34b7e21)

This pull request seeks to resolve a bug in the Inserter component where the selectors are incorrectly returned as functions, not invoked to retrieve their intended values. This prevents the expected behavior in InserterWithShortcuts from operating on the unmodified default block, because the value passed into withDispatch's onInsertBlock for selectedBlock is a function, not the block value itself.

Testing instructions:

Repeat steps to reproduce from #5291, verifying that replacing the unmodified default block is replaced correctly.

A related issue not yet reported: Verify that inserting a block while another is selected will insert after the selected block.

@aduth aduth added [Type] Bug An existing feature does not function as intended [Feature] Inserter The main way to insert blocks using the + button in the editing interface labels Feb 27, 2018
@aduth aduth added this to the 2.3 milestone Feb 27, 2018
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@aduth aduth merged commit 911cc91 into master Feb 28, 2018
@aduth aduth deleted the fix/5291-inserter-replace branch February 28, 2018 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blocks added via editor inserter (+) inserted out of order
2 participants