| Index: Source/core/editing/PlainTextRange.cpp
|
| diff --git a/Source/core/editing/PlainTextRange.cpp b/Source/core/editing/PlainTextRange.cpp
|
| index 1ebc8f4716fb1799a702f0b3bebb88d5e8f3b1a4..1bc69378452a4c9bc83b8754b7cc76f378f5f6a2 100644
|
| --- a/Source/core/editing/PlainTextRange.cpp
|
| +++ b/Source/core/editing/PlainTextRange.cpp
|
| @@ -111,8 +111,8 @@ PassRefPtrWillBeRawPtr<Range> PlainTextRange::createRangeFor(const ContainerNode
|
| // in those cases that textRunRange is used.
|
| if (foundEnd) {
|
| // FIXME: This is a workaround for the fact that the end of a run is often at the wrong
|
| - // position for emitted '\n's.
|
| - if (len == 1 && it.characterAt(0) == '\n') {
|
| + // position for emitted '\n's or if the renderer of the current node is a replaced element.
|
| + if (len == 1 && (it.characterAt(0) == '\n' || it.isInsideReplacedElement())) {
|
| scope.document().updateLayoutIgnorePendingStylesheets();
|
| it.advance();
|
| if (!it.atEnd()) {
|
|
|