Last modified: 2014-06-24 19:30:21 UTC
Intention: Add a gallery Steps to Reproduce: 1. Open a page in Safari. 2. Go to Insert > Gallery 3. Type in the name of an image and a caption. *Don't click or type anywhere else after this.* 4. Click on the save button. 5. Realize that the gallery dialog is still open, so cancel the save box. The dialog will close and the gallery will display. 6. Click on the save button again. Actual Results: The gallery displays on screen, but is not present in Review Changes or when the page is saved. If you click outside the gallery dialog after typing the name, or if you click the mysterious < button, then it works as expected. Expected Results: A button at the bottom of the gallery inserter that says "Insert this gallery now". Reproducible: Always
Created attachment 14483 [details] Screenshot displaying a visible gallery, and displaying the absence of the gallery in the wikitext code
More Observation: This issue happens for all other inspector for example: Math,Hiero, Link inspector.
Yuck. Clicking out of an inspector *into the surface* causes the inspector to close, applying changes. Clicking out of an inspector *outside the surface* (such as the save dialog launcher) causes the inspector to not close; when the save dialog is closed, this also closes the inspector and "insert" the content into CE but NOT DM, causing them to get out of sync. Not good.
Actually the CE and DM aren't out of sync, but the new document isn't being passed to Parsoid.
Change 112893 had a related patch set uploaded by Esanders: Give the document focus on save dialog open to resolve inspectors https://gerrit.wikimedia.org/r/112893
1. The document is given focus, triggering events which result in the inspectors being closed, and a transaction being created which inserts the extension node. 2. OOUI defers the close event of the dialog by 250ms for animation purposes, after which we set up a one-time listener to surface-transact to clear the serialization cache, but the transaction has already happened. Fix: Give the document focus before opening the save dialog to make sure it's in a more stable state.
(In reply to comment #6) > 2. OOUI defers the close event of the dialog by 250ms for animation purposes, > after which we set up a one-time listener to surface-transact to clear the > serialization cache, but the transaction has already happened. > Is there an event / method in OOUI (closing as opposed to close, maybe?) that fires before the animation? Then we could listen to that and immediately attach the event listener.
Change 112893 merged by jenkins-bot: Give the document focus on save dialog open to resolve inspectors https://gerrit.wikimedia.org/r/112893