Index: Source/WebCore/html/HTMLSelectElement.cpp |
=================================================================== |
--- Source/WebCore/html/HTMLSelectElement.cpp (revision 105691) |
+++ Source/WebCore/html/HTMLSelectElement.cpp (working copy) |
@@ -1146,7 +1146,7 @@ |
if (clickedElement->hasTagName(optionTag)) { |
// Keep track of whether an active selection (like during drag |
// selection), should select or deselect. |
- if (toHTMLOptionElement(clickedElement)->selected() && multi) |
+ if (toHTMLOptionElement(clickedElement)->selected() && multiSelect) |
m_activeSelectionState = false; |
if (!m_activeSelectionState) |
toHTMLOptionElement(clickedElement)->setSelectedState(false); |
@@ -1214,8 +1214,11 @@ |
if (m_multiple) { |
setActiveSelectionEndIndex(listIndex); |
updateListBoxSelection(false); |
- } else |
- updateSelectedState(listIndex, false, false); |
+ } else { |
+ setActiveSelectionAnchorIndex(listIndex); |
+ setActiveSelectionEndIndex(listIndex); |
+ updateListBoxSelection(true); |
+ } |
event->setDefaultHandled(); |
} |
} else if (event->type() == eventNames().mouseupEvent && event->isMouseEvent() && static_cast<MouseEvent*>(event)->button() == LeftButton && document()->frame()->eventHandler()->autoscrollRenderer() != renderer()) { |