Gutenberg: Pressing backspace doesn't delete an empty freeform block

Created on 19 Jun 2017  路  7Comments  路  Source: WordPress/gutenberg

If a freeform block is empty, pressing backspace doesn't remove the block. The freeform block should likely behave the same way as the text block in this instance.

related to the act of deleting blocks: #130 #1181 #1251

All 7 comments

@EphoxJames would you mind looking into this one when you have a moment?

@mtias I'll look into it today. It will probably be a simple matter of copying the relevant handler from the text block.

@EphoxJames I can still reproduce this. Have a chance to look at this?

Well the freeform block was taken over by @iseulde a while ago so since that happened I've been concentrating on other things - most recently keyboard navigation ( https://github.com/WordPress/gutenberg/pull/2392 ).

Currently freeform block doesn't use any of the merge / split callbacks. I imagine to get this working I would call the merge callback when the block was empty which shouldn't be too hard to implement so I will give it another try.

(PS. Aren't you meant to be on leave. :-P )

(PS. Aren't you meant to be on leave. :-P )

Hah, yes, the boy is meant to arrive today! But I'm not leaving until it's time, and like any good wizard he will arrive precisely when he means to.

I have a pull request to fix this issue at https://github.com/WordPress/gutenberg/pull/2482 anyone want to review it?

I've merged the fix so this issue should be fixed.

Was this page helpful?
0 / 5 - 0 ratings