Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix: Insert Before and Insert After appear even when default block can't be inserted #15024
Insert Before and Insert after just insert the default block. After the merge of the inserter restrictions PR if a block cannot be inserted the insert action does nothing.
This PR does not render an insert before/after button if the default block cannot be inserted.
How has this been tested?
I disabled the default block using:
I created a new post; I inserted an image; I pressed the button to open the "Elipsis menu" and verified "Insert Before/After" buttons don't appear.
I inserted the block "Allowed Blocks Set" available at https://gist.github.com/jorgefilipecosta/ee7969d72e13e9e8e3ab58efdd1fd03b.