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
- Tutorial on setting up and working with Gerrit (Gerrit is Wikimedia's code review platform)
- Files that needs to be modified: PagelistInputWidget.VisualDialogModel.js and PagelistInputWidget.WikitextDialogModel.js
- OOUI (the framework used to build the PagelistWidget)
- Documentation for mw.confirmCloseWindow()