Skip to content

Custom HTML block: Warning modal is not shown even if there are unsaved changes #76080

@t-hamano

Description

@t-hamano

What problem does this address?

In the custom HTML block, if the modal is closed when there are unsaved changes, a modal should appear and prompt us to choose what action to take.

e25733f2ef534a2d8983af26f356ea2c.mp4

However, I discovered that this feature doesn't work in the first place. This is because if there are unsaved changes, the shouldCloseOnClickOutside prop and shouldCloseOnEsc prop are false, and the onRequestClose event handler doesn't work.

What is your proposed solution?

While this functionality can be restored easily, it feels unnatural since there is no other UI that would display such nested modals in the first place, and I personally think it's fine to remove this modal.

cc @youknowriad @ntsekouras @Mamaduka @jasmussen

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] HTMLAffects the the HTML Block[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    Status

    🗣️ In Discussion / Needs Decision

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions