Page MenuHomePhabricator

VisualEditor: TypeError: Cannot call method 'getModel' of null when adding a newline after a new media item
Closed, ResolvedPublic

Description

Screenshot

Steps to reproduce:

1.Open a page with VE which has some content
2.Add any image from Insert>Media after going to a newline.
3.Save the page
4.Reopen the page
5.Place the cursor in a new line and hit return

Observed Result:
Newline cannot be added , in the console an error appears:
TypeError: outermostNode is null

...documentModel,selection.from,'\n');}else{node.traverseUpstream(function(node){if...

load.p...1826Z&* (line 261)

Test Environment: mw.org
Browser: FF 25
OS: MAC OS X 10. 8. 5


Version: unspecified
Severity: normal
URL: https://www.mediawiki.org/w/index.php?title=User:Jdforrester_(WMF)/Sandbox_345&oldid=885285?veaction=edit

Attached:

Screen_Shot_2014-01-10_at_9.25.00_AM.png (665×1 px, 245 KB)

Details

Reference
bz59911

Event Timeline

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

Seems to be failing to handle enter when in a block slug for some reason… but only on the page re-load.

Line 1675 of ve.ce.Surface.js (in handleEnter) is throwing "TypeError: Cannot call method 'getModel' of null" because "outermostNode" is null.

ncaught TypeError: Cannot call method 'getModel' of null ve.ce.Surface.js:1675

Change 109693 had a related patch set uploaded by Divec:
WIP:Fix handleEnter when not in a splittable node

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

  • Bug 61932 has been marked as a duplicate of this bug. ***
  • Bug 61525 has been marked as a duplicate of this bug. ***
  • Bug 62015 has been marked as a duplicate of this bug. ***

Change 109693 merged by jenkins-bot:
Fix handleEnter in nodes that don't split

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