Skip to content

Inconsistency in handling 'cancel' modals #29046

Closed
@zokkis

Description

@zokkis

Description

Some modals reset there state if canceled but most of the modals only close but persist any changes to the data.

To reproduce this

  • create Project

  • click 'New Column'

  • enter title

  • click 'cancel' in modal

  • click 'New Column' -> title is still there

  • the same is on like every other modal

    • edit column
    • Transfer Ownership
    • Delete Wiki Data
    • Delete This Repository
    • Deploy Keys -> its not a modal
    • Add Secret
    • Manage SSH Keys -> its not a modal
    • Manage GPG Keys -> its not a modal
  • on other modals the state gets reset

    • Add Variable -> (still gets the 'stay on page' question)
    • Submit review -> don't reset, but without 'stay on page' question

On some modals (like modals to create something) its ok and maybe good to have, but on other modals like edit/delete it should reset the state
The problem is, that the form has data and always ask to 'stay on page' because of unsaved data

Gitea Version

1.21.5

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

Screenshot from 2024-02-04 10-38-38

Git Version

No response

Operating System

Linux

How are you running Gitea?

I used the download, but it's also the same with own builds and on try.gitea.io

Database

MySQL/MariaDB

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions