Page MenuHomePhabricator

VisualEditor: VE doesn't load on mobile anymore
Closed, ResolvedPublic

Description

http://en.m.wikipedia.beta.wmflabs.org/wiki/Forty-seven_Ronin?mobileaction=alpha#editor/0

Error: Container must be attached to the DOM Error {stack: (...), message: "Container must be attached to the DOM"}


Version: unspecified
Severity: normal

Details

Reference
bz60662

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:59 AM
bzimport set Reference to bz60662.

This is exposing a pre-existing bug in mobile VE or MobileFrontend's VE integration or something in this ecosystem: you cannot initialize targets into a container that isn't already attached to the DOM. Previously, you could do this and various things regarding measurements would just break and render wrong, but now we throw an exception.

@Juliusz: Looks like the .surface element selector here is either not finding anything at all or it is referring to something that is still detached at that point:

https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/c4264d76bc817df71c6b3631afb19be737246c52/javascripts/modules/editor/VisualEditorOverlay.js#L16

It doesn't have to be fully initialised, but the target container element should however be somewhere in the document.

Change 110498 had a related patch set uploaded by JGonera:
Fix VE error with latest VE master

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

Change 110498 merged by jenkins-bot:
Fix VE error with latest VE master

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