Skip to content

Resolve "WebIDE asks for confirmation to leave the page when committing and creating a new MR"

Himanshu Kapoor requested to merge 30881-webide-mr-confirmation into master

What does this MR do?

Clear staged changes before redirection

Any local changes in WebIDE should be cleared before redirecting to the new merge request page. Earlier, it was happening just after redirection, which causes onbeforeunload event to trigger and warns the user that his unsaved changes will be lost, when in fact there are no unsaved changes at this point.

The test for this case was falsely passing. I have modified it to ensure that it always fails in the absence of this change.

Screenshots

Before:

before

After:

The popup would not appear.

Does this MR meet the acceptance criteria?

Conformity

Performance and Testing

Closes #30881 (closed)

Edited by Himanshu Kapoor

Merge request reports