Skip to content

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

Merged
aduth merged 1 commit intomasterfrom
fix/5291-inserter-replace
Feb 28, 2018
Merged

Inserter: Fix unmodified default block replace, insert after selected#5296
aduth merged 1 commit intomasterfrom
fix/5291-inserter-replace

Conversation

@aduth
Copy link
Copy Markdown
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
@aduth aduth requested review from mcsf and youknowriad February 27, 2018 21:20
Copy link
Copy Markdown
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