diff --git a/editor/libeditor/html/nsHTMLEditorStyle.cpp b/editor/libeditor/html/nsHTMLEditorStyle.cpp
index 1eb0015ebe2..4396988ac09 100644
--- a/editor/libeditor/html/nsHTMLEditorStyle.cpp
+++ b/editor/libeditor/html/nsHTMLEditorStyle.cpp
@@ -1220,7 +1220,7 @@ nsHTMLEditor::GetInlinePropertyBase(nsIAtom *aProperty,
text = do_QueryInterface(content);
// just ignore any non-editable nodes
- if (text && !IsEditable(text)) {
+ if (text && (!IsEditable(text) || IsEmptyTextNode(this, content))) {
continue;
}
if (text) {