Index: Source/core/page/EventHandler.cpp |
diff --git a/Source/core/page/EventHandler.cpp b/Source/core/page/EventHandler.cpp |
index 8a357893004c3362e63c3c436eb0b8d5730b6a3e..77148f904ac722a0cad3427fc528ea3537b8ddc4 100644 |
--- a/Source/core/page/EventHandler.cpp |
+++ b/Source/core/page/EventHandler.cpp |
@@ -763,16 +763,18 @@ bool EventHandler::handleMouseReleaseEvent(const MouseEventWithHitTestResults& e |
// Clear the selection if the mouse didn't move after the last mouse |
// press and it's not a context menu click. We do this so when clicking |
- // on the selection, the selection goes away. However, if we are |
- // editing, place the caret. |
+ // on the selection, the selection goes away. For readonly texts |
+ // we do need to know the position of the caret for any selection |
+ // using keyboard shortcuts as its currently working in non-webkit |
+ // based browsers for ex: firefox. Therefore, place the caret even |
+ // for non-ediatble texts. |
Inactive
2014/05/13 19:28:52
"non-editable"
b.rout
2014/05/14 07:00:46
will correct it. Thanks.
On 2014/05/13 19:28:52,
|
if (m_mouseDownWasSingleClickInSelection && m_selectionInitiationState != ExtendedSelection |
&& m_dragStartPos == event.event().position() |
&& m_frame->selection().isRange() |
&& event.event().button() != RightButton) { |
VisibleSelection newSelection; |
Node* node = event.targetNode(); |
- bool caretBrowsing = m_frame->settings() && m_frame->settings()->caretBrowsingEnabled(); |
- if (node && node->renderer() && (caretBrowsing || node->rendererIsEditable())) { |
+ if (node && node->renderer()) { |
VisiblePosition pos = VisiblePosition(node->renderer()->positionForPoint(event.localPoint())); |
newSelection = VisibleSelection(pos); |
} |