Skip to content

XWIKI-24270: Saving in the class editor sometimes shows a confirmation about unsaved changes#5397

Merged
michitux merged 2 commits intoxwiki:masterfrom
michitux:XWIKI-24270
Apr 20, 2026
Merged

XWIKI-24270: Saving in the class editor sometimes shows a confirmation about unsaved changes#5397
michitux merged 2 commits intoxwiki:masterfrom
michitux:XWIKI-24270

Conversation

@michitux
Copy link
Copy Markdown
Contributor

Jira URL

https://jira.xwiki.org/browse/XWIKI-24270

Changes

Description

  • Add a submitInProgress marker to dataeditors.js to prevent the warning when submission is in progress.
  • Handle the Save & View button of the class editor in actionButtons.js to trigger the standard save event when it is pressed, but as a custom form specified in editclass.vm to avoid a major change to how the form is handled.

Clarifications

  • The main trigger for this change are test failures on CI due to disabling the automatic dismissal of the onbeforeunload dialogs in Firefox. However, it was confirmed by a user that the dialogs were also present sometimes during actual use of the class editor.

Screenshots & Video

No UI changes.

Executed Tests

Built the changed modules with the quality profile, executed ObjectEditorIT and xwiki-platform-livedata-test-docker which were failing before.

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches:
    • stable-17.10.x
    • stable-18.3.x

…n about unsaved changes

* Add a submitInProgress marker to dataeditors.js to prevent the warning when submission is in progress.
* Handle the Save & View button of the class editor in actionButtons.js to trigger the standard save event when it is pressed, but as a custom form specified in editclass.vm to avoid a major change to how the form is handled.
…n about unsaved changes


* Improve code style

Co-authored-by: raphj <raphael.github@jakse.fr>
@michitux michitux merged commit 1065e2f into xwiki:master Apr 20, 2026
2 checks passed
@michitux michitux deleted the XWIKI-24270 branch April 20, 2026 10:20
github-actions Bot pushed a commit that referenced this pull request Apr 20, 2026
…n about unsaved changes (#5397)

* Add a submitInProgress marker to dataeditors.js to prevent the warning when submission is in progress.
* Handle the Save & View button of the class editor in actionButtons.js to trigger the standard save event when it is pressed, but as a custom form specified in editclass.vm to avoid a major change to how the form is handled.

(cherry picked from commit 1065e2f)
@github-actions
Copy link
Copy Markdown

💔 Some backports could not be created

Status Branch Result
stable-17.10.x Backport failed because of merge conflicts
stable-18.3.x

Manual backport

To create the backport manually run:

backport --pr 5397

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants