diff options
Diffstat (limited to 'WebCore/editing/RemoveFormatCommand.cpp')
-rw-r--r-- | WebCore/editing/RemoveFormatCommand.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/WebCore/editing/RemoveFormatCommand.cpp b/WebCore/editing/RemoveFormatCommand.cpp index e456df6..257172b 100644 --- a/WebCore/editing/RemoveFormatCommand.cpp +++ b/WebCore/editing/RemoveFormatCommand.cpp @@ -49,7 +49,10 @@ RemoveFormatCommand::RemoveFormatCommand(Document* document) void RemoveFormatCommand::doApply() { Frame* frame = document()->frame(); - + + if (!frame->selection()->selection().isNonOrphanedCaretOrRange()) + return; + // Make a plain text string from the selection to remove formatting like tables and lists. String string = plainText(frame->selection()->selection().toNormalizedRange().get()); |