diff --git a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp index 251ca22b1d5..22f1282b09b 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp @@ -4125,7 +4125,19 @@ nsHTMLEditRules::WillOutdent(nsISelection *aSelection, PRBool *aCancel, PRBool * if (NS_FAILED(res)) return res; } else if (useCSS) { - RelativeChangeIndentationOfElementNode(curNode, -1); + nsCOMPtr element; + nsCOMPtr textNode = do_QueryInterface(curNode); + if (textNode) { + // We want to outdent the parent of text nodes + nsCOMPtr parent; + textNode->GetParentNode(getter_AddRefs(parent)); + element = do_QueryInterface(parent); + } else { + element = do_QueryInterface(curNode); + } + if (element) { + RelativeChangeIndentationOfElementNode(element, -1); + } } } }