mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 18:39:52 +00:00
f538fcf6be
The sanity check converts the linear model back to DOM, then compares this DOM to the original DOM and rejects the deferred if they are not equal. The DOM creation has to be done synchronously (before we unlock the surface), but the actual comparsion can be (and is) done asynchronously. To make the UI flow of the save dialog easier we just keep the save button on the toolbar itself disabled until the sanity check is done. Though this should finish before the user starts editing the document (let alone start saving), we do add a class to the button to indicate a progress cursor. To simulate a slow sanity check, set the setTimeout in startSanityCheck to 5000, load VE, make a change, hover the button, and see it change from disabled + progress-cursor to enabled after 5 seconds. To simulate the sanity check failing, change !== to === in the first "if" in startSanityCheck. Bug: 47521 Bug: 50067 Change-Id: I04f71fe8e00c6257fbc953cc9de3323e24709b0f |
||
---|---|---|
.. | ||
ve.init.mw.ViewPageTarget.js |