Skip to content

Adding a new block inside other block that is the only block in editor removes the whole parent block #1974

@dratwas

Description

@dratwas

During implementing the video background support in the cover block, I found an issue. When I try to add a new block inside and I click on the "Add block" button, it removes the whole cover block. That happens only when the cover block is the only block in the editor and has at least two paragraphs in it. The first paragraph has content inside and the second is empty and is selected.

To Reproduce
Steps to reproduce the behavior:

  1. Add the cover block and select an image as a background. (it has to be the only block)
  2. Write something in the paragraph that is added and click return
  3. The next paragraph should be added and selected.
  4. When the empty paragraph is selected, click on the "Add block" button.
  5. The whole cover block is removed and any other block can not be added.

Expected behavior
The block should be added to the cover block.

Screenshots
cover-issue

android-cover-issue

EDIT: I can reproduce it also for the group block.

Smartphone (please complete the following information):

  • Device: Iphone 11
  • OS: iOS 13.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions