diff options
Diffstat (limited to 'WebCore/editing/SelectionController.cpp')
-rw-r--r-- | WebCore/editing/SelectionController.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/WebCore/editing/SelectionController.cpp b/WebCore/editing/SelectionController.cpp index 6f25c86..bb42662 100644 --- a/WebCore/editing/SelectionController.cpp +++ b/WebCore/editing/SelectionController.cpp @@ -642,6 +642,8 @@ bool SelectionController::modify(EAlteration alter, EDirection direction, TextGr willBeModified(alter, direction); + bool wasRange = m_selection.isRange(); + Position originalStartPosition = m_selection.start(); VisiblePosition position; switch (direction) { case DirectionRight: @@ -673,6 +675,10 @@ bool SelectionController::modify(EAlteration alter, EDirection direction, TextGr if (position.isNull()) return false; + if (isSpatialNavigationEnabled(m_frame)) + if (!wasRange && alter == AlterationMove && position == originalStartPosition) + return false; + // Some of the above operations set an xPosForVerticalArrowNavigation. // Setting a selection will clear it, so save it to possibly restore later. // Note: the START position type is arbitrary because it is unused, it would be |