﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6735	Wrong checkReadOnly implementation	Dinu	Sa'ar Zac Elias	"{{{
	function checkReadOnly( selection )
	{
		if ( selection.getType() == CKEDITOR.SELECTION_ELEMENT )
			return selection.getSelectedElement().isReadOnly();
		else
			return selection.getCommonAncestor().isReadOnly();
	}
}}}

Problems:[[BR]]
1) If selection is type element, the selection is read-only if the parent (rather than element) is read-only. Consider:[[BR]]
{{{
<p>
    <span contenteditable=""false"">abcd</span>
</p>
}}}
If the selected element is <span>, it's editable (as in, it can be deleted, replaced, etc.[[BR]]
2) If selection is a range, the logic is more complex; it can so happen that the common ancestor is editable but the range spans an uneditable fragment; consider:
{{{
<p>
    <span contenteditable=""false"">
        ab[cd
    </span>
    ef]gh
}}}
Marked with [...] is the selection; in this case, the common ancestor is <p> which is editable, but the range should be read-only because the [cd] portion is uneditable. For non-nested contenteditable, the right logic is: if for all ranges, the start, end, or common ancestor is read-only, the selection is read-only; for nested contenteditable, the logic is gruesome."	Bug	closed	Normal	CKEditor 3.5.1	Core : Read-only	3.4.2	fixed		
