Open Bug 1240553 Opened 5 years ago Updated 5 years ago

document.execCommand insertHTML loses the startContainer instance

Categories

(Core :: DOM: Core & HTML, defect)

43 Branch
defect
Not set
normal

Tracking

()

UNCONFIRMED

People

(Reporter: cyril.auburtin, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
Build ID: 20160105164030

Steps to reproduce:

demo: http://jsfiddle.net/crl/cpzgzr7p/7/


Actual results:

the text is splitted after insertHTML (this differs from webkit, but this is fine), the problem is that the instance of the startContainer become the last text node instead of the first one (like it should occur when using .splitText )




Expected results:

It should have kept sc (startContainer) as the first text node, it's particularly important to select the change that was done
Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core
You need to log in before you can comment on or make changes to this bug.