Last modified: 2014-06-24 19:30:21 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T62837, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 60837 - VisualEditor: Adding new content via an inspector (formula, gallery, hiero, etc.) and opening the save dialog results in confusion
VisualEditor: Adding new content via an inspector (formula, gallery, hiero, e...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Editing Tools (Other open bugs)
unspecified
All All
: High normal
: VE-deploy-2014-02-13
Assigned To: Ed Sanders
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-04 19:06 UTC by WhatamIdoing
Modified: 2014-06-24 19:30 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Screenshot displaying a visible gallery, and displaying the absence of the gallery in the wikitext code (107.40 KB, image/png)
2014-02-04 19:08 UTC, WhatamIdoing
Details

Description WhatamIdoing 2014-02-04 19:06:30 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
Comment 1 WhatamIdoing 2014-02-04 19:08:07 UTC
Created attachment 14483 [details]
Screenshot displaying a visible gallery, and displaying the absence of the gallery in the wikitext code
Comment 2 Rummana Yasmeen 2014-02-04 20:57:07 UTC
More Observation: This issue happens for all other inspector for example: Math,Hiero, Link inspector.
Comment 3 James Forrester 2014-02-06 04:39:32 UTC
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.
Comment 4 Ed Sanders 2014-02-11 16:44:17 UTC
Actually the CE and DM aren't out of sync, but the new document isn't being passed to Parsoid.
Comment 5 Gerrit Notification Bot 2014-02-12 14:15:26 UTC
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
Comment 6 Ed Sanders 2014-02-12 14:18:33 UTC
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.
Comment 7 Roan Kattouw 2014-02-12 18:27:11 UTC
(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.
Comment 8 Gerrit Notification Bot 2014-02-12 18:28:40 UTC
Change 112893 merged by jenkins-bot:
Give the document focus on save dialog open to resolve inspectors

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links