mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
dad06ef495
It's good that we're not trying to close the save dialog if it's not open, but we still need to release our reference to it in that case, otherwise trying to open the save dialog in a new incarnation of the editor will fail. If you opened VE, opened the save dialog, closed it, went back to read mode, opened VE again, and tried to open the save dialog again, it would fail because it tried to open the cached reference to the previous editor's save dialog. Bonus: prevent JS errors in this case by only attaching an onClose handler if the dialog actually opened successfully. If opening the dialog failed, the callback parameter isn't a promise but an OO.ui.Error, and calling .always() causes a JS error. Change-Id: I62d6d3e7cd3df2c29a0c99e2e23bf1aac5187a12 |
||
---|---|---|
.. | ||
ce | ||
dm | ||
i18n | ||
init | ||
tests | ||
ui |