jejacks0n/mercury — Issue #67: Webkit, weird editing behavior on backspace key
Author: JeanMertz
Created: 2011-11-01 14:56:33+00:00
State: open

I was working in Google Chrome on a webpage, and I had the following content in an editable div:

![Before](http://f.cl.ly/items/1Q330P0W1U2x0G3y1E3x/screenshot-021-01-11-2011.png)

I wanted to make the two divs into one (without using the html editor), and so I placed my cursor at the start of the second div, and hit backspace. This was the result:

![After](http://f.cl.ly/items/3t2i1b143f2q0z3N3L1I/screenshot-022-01-11-2011.png)

Not only was my second div placed somewhere in the middle of the content of the first div, a lot of weird `Apple-style-span` spans where added to the content.

To make matters worse, these new elements include a lot of whitespace and can't be removed by hitting backspace. If you position the mouse cursor behind one of these whitespace elements, and hit backspace, the characters **before** the element get removed, which are actually a few positions away from the current cursor position.

Ever noticed this? And any idea if this can be solved in Mercury or if this is a (pretty severe) bug in the browsers?