mirror of
https://github.com/roytam1/UXP.git
synced 2026-05-26 13:58:49 +00:00
Issue #2135 - Bug 1066965: Make contentEditable and spellchecking to work in Shadow DOM
This commit is contained in:
@@ -1725,10 +1725,11 @@ Element::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
||||
if (!hadParent) {
|
||||
uint32_t editableDescendantChange = EditableInclusiveDescendantCount(this);
|
||||
if (editableDescendantChange != 0) {
|
||||
// If we are binding a subtree root to the document, we need to update
|
||||
// the editable descendant count of all the ancestors.
|
||||
// If we are binding a subtree root to the document, we need to update
|
||||
// the editable descendant count of all the ancestors. However, we don't
|
||||
// cross the Shadow DOM boundary (expected behavior is unclear).
|
||||
nsIContent* parent = GetParent();
|
||||
while (parent) {
|
||||
while (parent && parent->IsElement()) {
|
||||
parent->ChangeEditableDescendantCount(editableDescendantChange);
|
||||
parent = parent->GetParent();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user