Page MenuHomePhabricator

Ask the user to save changes before leaving page when PagelistWidget has changes
Open, Needs TriagePublic

Description

Currently, the Pagelist Widget doesn't do anything when a user closes the tab/navigates away while having unsaved changes.

We should trigger browser's default unsaved changes dialog when a user navigates away/closes the tab while still having un-inserted changes in the Pagelist Widget

P.S: We should use MediaWiki's mw.confirmCloseWindow() api to implement this.

Documentation

Event Timeline

For context, in both of the models, the method updateCachedDataFromMainModel() is used to initialize the model with data, when the dialog is opened and unloadCachedData() is called when the dialog is closed.

@Iamumangg: I don't think that removing someone else as an assignee without consent is common; did CipherGirl agree to this beforehand?

Hey it's okay to claim, I'm no longer looking into this.

Aklapper added a subscriber: Iamumangg.

@Iamumangg: Per emails from Sep18 and Oct20 and https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup , I am resetting the assignee of this task because there has not been progress lately (please correct me if I am wrong!). Resetting the assignee avoids the impression that somebody is already working on this task. It also allows others to potentially work towards fixing this task. Please claim this task again when you plan to work on it (via Add Action...Assign / Claim in the dropdown menu) - it would be welcome. Thanks for your understanding!

Change #1053788 had a related patch set uploaded (by Aditya0545; author: Aditya0545):

[mediawiki/extensions/ProofreadPage@master] PagelistWidget: Trigger browser's unsaved changes dialog on page/tab close

https://gerrit.wikimedia.org/r/1053788