Last modified: 2014-03-07 20:32:14 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 T54112, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52112 - VisualEditor: Inserting template into slug throws JS error (causing dialogs to break)
VisualEditor: Inserting template into slug throws JS error (causing dialogs t...
Status: RESOLVED WORKSFORME
Product: VisualEditor
Classification: Unclassified
ContentEditable (Other open bugs)
unspecified
All All
: High normal
: ---
Assigned To: Editing team bugs – take if you're interested!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-26 19:33 UTC by Excirial
Modified: 2014-03-07 20:32 UTC (History)
6 users (show)

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


Attachments
Firefox 22 - Error console. (43.75 KB, image/png)
2013-07-26 19:33 UTC, Excirial
Details

Description Excirial 2013-07-26 19:33:36 UTC
Created attachment 12980 [details]
Firefox 22 - Error console.

Tested on Firefox 22 (Monobook) and Chrome 28 (Vector)

Steps to reproduce:
1) Open the [[Martin J. Silverstein]] in the visual editor.
2) Click on the empty line between the "Diplomatic posts" and "United States Ambassadors to Uruguay Uruguay" template
3) Click the "Transclusions" button, add the "Botnets" template and apply the edit.
4) Try to use any button on the visual toolbar that creates a window, or try to open any existing item that creates a window. This will no longer be possible.

Console log:
- The added screenshot is the error console as seen in Firefox. On step 3 the "DOM Offset" error is added.
- On step 4 (And after every subsequent click on an element that creates a window) the "Cannot create a window" error will be added.
Comment 1 Roan Kattouw 2013-07-26 19:39:15 UTC
Relevant error: "Error: Offset could not be translated to a DOM element and offset: 1407"

The inability to open other dialogs is because the error causes the first dialog to never close, and so opening other dialogs fails because VE thinks you've already got a dialog open.

Is this due to adding a transclusion in a slug, perhaps?
Comment 2 Excirial 2013-07-26 20:26:35 UTC
Having tested a few more scenario's it would seem that editing near templates in general causes console errors, though none of these seem to cause any lasting issues.

- Selecting the line mentioned in step 2 and pressing enter will return the console error "TypeError: outermostNode is null"
- Typing a text under the bottom template of the page and then pressing backpace till the text and that template are gone will cause an error if that edit is undone afterwards:
-- "Error: Range error: Range is no longer valid after DOM mutation "
-- "Error: Offset could not be translated to a DOM element and offset: 1405"

As mentioned before, neither of these errors seem to impact anything in the editor or the edit itself.
Comment 3 James Forrester 2013-07-26 23:03:53 UTC
Thought we had fixed insertion into slugs in bug 44084 - has this re-surfaced?
Comment 4 Krinkle 2013-10-30 22:28:56 UTC
I can't reproduce this.
Comment 5 James Forrester 2014-03-07 20:32:14 UTC
This appears to now be fixed - marking as WORKSFORME.

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


Navigation
Links