﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
9998	[Umbrella][Blink/Webkit] Issues related to backspace and delete keys handling	lmeurs		"This is an umbrella ticket for all issues related to backspace and delete keys handling caused by the following Webkit's and Blink's bugs:

* http://code.google.com/p/chromium/issues/detail?id=226941
* https://bugs.webkit.org/show_bug.cgi?id=114791

Related tickets: #8438, #8439, #8440, #10359, #10515, #11483, #11592, and many others...

----

== Cases ==

=== <span> created while joining two adjacent elements ===

Related issues: #9998

'''Target ticket''': #11861

==== Example 1 ==== 

1. Set data 
 {{{
<p>foo</p>
<p>^bar</p>
}}}
2. Backspace.
3. `<p>foo<span style=""line-height:1.6"">bar</span></p>`

==== Example 2 ==== 

1. Set data
 {{{
<h1>foo</h1>
<p>^bar</p>
}}}
2. Backspace.
3. `<h1>foo<span style=""font-size:13px; line-height:1.6"">bar</span></h1>`

=== <span> created while joining two adjacent elements (non-collapsed selection) ===

Related issues: #9998

'''Target ticket''': #11980

==== Example 1 ==== 

1. Set data
 {{{
<div>
  <p>fo[o</p>
</div>

<div>
  <p>b]ar</p>
</div>
}}}
2. BACKSPACE
3. Result:
 {{{
<div>
  <p>fo<span style=""line-height:1.6"">^ar</span></p>
</div>
}}}
4. '''Expected'''
 {{{
<div>
  <p>fo^ar</p>
</div>
}}}

=== Attempt to preserve the visual style of the contents -> i.e. <strong> becomes <b> ===

==== Backspace (unable to remove formatting) ====

Related issues: #8438, #11592, #11483

1. `<p>x<strong>y^</strong></p>`
2. Backspace.
3. Type “z”.
4. `<p>x<b>z^</b></p>`

====  Backspace (underlined link becomes `<u>`) ==== 

Related issues: #11592

1. `<p><a href=""http://foo"">[foo]</a>bar</p>`
2. Backspace.
3. Type ""foo"".
4. `<p><u>foo^</u>bar</p>`
5. ''Frown''
6. ''Grin''

'''Note''': This case uncovers the algorithm used in Webkit. 
The engine attempts to preserve the style no matter how ridiculous it would be – it uses `<u>` because it is the closest style, 
which corresponds visually with underlined link.

==== Del (unable to remove formatting) ==== 

Related issues: #8439, #8440, #12100

1. `<p>foo</p>`
2. CTRL+A.
3. Bold.
4. DEL.
5. Type “bar”.
6. `<p><b>bar^</b></p>`

Another example available in Blink browsers only:
1. Switch to source mode and clear editor contents
2. Paste this code {{{<p><strong>test</strong></p>}}}
3. Press Ctrl+A
4. Hit Backspace.
Result: Elements' path in Blink shows 'p' and when user starts typing text will be bold again. If user presses Backspace two times then whole formatting will be removed but there is no way for user to know that.


=== <span> created while splitting elements (DnD), extra &nbsp; ===

Related issues: #10515

1. Set the following HTML
 {{{
<p>
    <span style=""font-size:28px"">
        foo 
        <strong>[bar]</strong> 
        <em>bam</em> 
        bang
    </span>
</p>
}}}
2. Drag `[bar]` into `ba|m`
3. `editor.getData()`.
4. See the result.
 {{{
<p>
    <span style=""font-size:28px"">
        foo &nbsp;
        <em>ba</em>
    </span>
    <strong style=""font-size:28px; line-height:44.79999923706055px"">bar</strong>
    <em style=""font-size:28px; line-height:1.6"">m</em>
    <span style=""font-size:28px; line-height:1.6""> bang</span>
</p>
}}}
5. Then WYSIWYG->Source->WYSIWYG.
6. ACF brings the ultimate destruction.
 {{{
<p>
    <span style=""font-size:28px"">foo &nbsp;<em>ba</em></span>
    <strong>bar</strong>
    <em>m</em>
    <span style=""font-size:28px""> bang</span>
</p>
}}}"	Bug	confirmed	High		General			Blink Webkit	laura@… ben@… matti.jarvinen@… ivanjh@… joel.peltonen@…
