google chrome - Why does a span of 'display: none' prevent deletion of a preceding, 'contententeditable = false' span? -


this behaviour specific chrome (at time of writing version 26.0.1410.64 m know it's been happening while).

take following html:

<div contenteditable="true">     <div contenteditable="false">         <div contenteditable="true"><div><span contenteditable="false">[interruption]</span><span style="display: none;"></span></div></div>     </div> 

in resulting contenteditable div, put caret after 'interruption' span. try use backspace delete it. you'll find impossible.

here jsfiddle illustrating this.

note typing text after 'interruption' span fixes issue, in can left-arrow span finishes , backspace usual. remove text, issue recurs.

it of particular concern me because span of display: none integral part of rangy, range , selection library using. finding using rangy prevent spans being deleted , seems root cause.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -