Page MenuHomePhabricator

Content truncated with JS error when switching from source to visual
Open, Needs TriagePublic

Description

This is a report from someone else.

I think the steps were:

  1. Create article (in draft namespace) in visual mode.
  2. Save first edit.
  3. Edit source
  4. Switch to visual

The content was then truncated, with the following error:

VM485:574 Error: Failed to restore auto-saved session: TypeError: this.children[i].getAnnotatedHtml is not a function
    at VeDmSurface.ve.dm.Surface.restoreChanges (load.php?debug=false&lang=en&modules=ext.CodeMirror.lib|ext.visualEditor.core&skin=vector&version=12jvj8k:426)
    at VeInitMwDesktopArticleTarget.ve.init.mw.ArticleTarget.surfaceReady (<anonymous>:573:933)
    at VeInitMwDesktopArticleTarget.ve.init.mw.DesktopArticleTarget.surfaceReady (<anonymous>:1091:917)
ve.init.mw.ArticleTarget.surfaceReady @ VM485:574