﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
12583	Certain edit operations destroy the protected structure of a widget	jhub		"Reproduce with the help of the simplebox widget:

Click the toolbar button to insert a simplebox.

In the second of the two editable boxes of the widget, set the cursor somewhere in the middle of the word ""Content..."".

Use SHIFT+Cursorkeys to move the cursor up into the first of the editable boxes, somewhere in the middle of the word ""Title"", so that you have a selected text area that selects the end of the word ""Title"" and the beginning of the word ""Content..."".

Press DELETE to delete the selected text.

The result is as expected: The remaining text is now in the first box (the title box), but the content box, which is now empty, is still there, i.e. you can again insert new text into the content box.

Now make the following slight modification to the simplebox plugin:

Change the template so that the title box (the one with class=""simplebox-title"") is a div instead of a h2, like so:
{{{
template:
    '<div class=""simplebox"">' +
        '<div class=""simplebox-title"">Title</div>' +
        '<div class=""simplebox-content""><p>Content...</p></div>' +
    '</div>',
}}}

(Also for completeness sake, change the ""allowedContent"" so that it says ""div(!simplebox-title)"" instead of ""h2(!simplebox-title)"".)

Reload the editor and repeat the above experiment.

You will see that when you press DELETE to delete the highlighted text, that the text is deleted as expected, but the second editable box (the div with class=""simplebox-content"") is also deleted, i.e. a protected part of the widget is damaged. You can no longer add new text into the ""content"" field of the widget since it no longer exists."	Bug	confirmed	Normal		General	4.3		Blink Webkit	
