Reviewed by Ken.
[WebKit-https.git] / WebCore / khtml / khtml_part.cpp
index 5f0acadf38c02dac41010e608dbb9a372bbc3c64..be41a846a9881790ad2fc7cedbc6cd3df7b35d43 100644 (file)
@@ -4401,7 +4401,8 @@ void KHTMLPart::handleMousePressEventSingleClick(khtml::MousePressEvent *event)
 
         if (!innerNode.isNull() && innerNode.handle()->renderer() &&
             innerNode.handle()->renderer()->shouldSelect()) {
-            bool extendSelection = mouse->state() & ShiftButton;
+            // Extend the selection if the Shift key is down, unless the click is in a link.
+            bool extendSelection = (mouse->state() & ShiftButton) && (!event->url().isNull());
 
             // Don't restart the selection when the mouse is pressed on an
             // existing selection so we can allow for text dragging.