Page MenuHomePhabricator

Javascript error when translating empty paragraph - Can't access property "shallowCloneFromRange", node.getDocument() is null
Open, MediumPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):
Start a translation: https://ml.wikipedia.org/w/index.php?title=%E0%B4%AA%E0%B5%8D%E0%B4%B0%E0%B4%A4%E0%B5%8D%E0%B4%AF%E0%B5%87%E0%B4%95%E0%B4%82:%E0%B4%B2%E0%B5%87%E0%B4%96%E0%B4%A8%E0%B4%AA%E0%B4%B0%E0%B4%BF%E0%B4%AD%E0%B4%BE%E0%B4%B7&from=en&page=Palakkad+Sreeram&to=ml

Click on the first empty section. It has no content.
Observe js error:

What happens?:

image.png (535×1 px, 179 KB)

Error:

Uncaught (in promise) TypeError: can't access property "shallowCloneFromRange", node.getDocument() is null
    getDomFromNode ve.dm.DomFromModelConverter.js:320
    getDomFromNode ve.dm.Converter.js:69
    changeContentSource ve.init.mw.CXTarget.js:1094
    onDocumentActivatePlaceholder ve.init.mw.CXTarget.js:824
    promise callback*ve.init.mw.CXTarget.prototype.onDocumentActivatePlaceholder ve.init.mw.CXTarget.js:821
    emit oojs.js:858
    executeCommand ve.ce.CXPlaceholderNode.js:67
    onFocusableMouseDown ve.ce.CXPlaceholderNode.js:62
    emit oojs.js:858
    onClick oojs-ui-core.js:2381
    jQuery 2
ve.dm.DomFromModelConverter.js:320:8

What should have happened instead?:

JS error should not happen

Event Timeline

I can't find anything about this in Logstash.

Nikerabbit moved this task from Needs Triage to Translation editor on the ContentTranslation board.