| Index: Source/core/html/HTMLSelectElement.cpp
|
| diff --git a/Source/core/html/HTMLSelectElement.cpp b/Source/core/html/HTMLSelectElement.cpp
|
| old mode 100644
|
| new mode 100755
|
| index 2d581071d37568b86dd674a14514976a284ad179..c1682651de2c92da005c15a80b3b681f9f339c49
|
| --- a/Source/core/html/HTMLSelectElement.cpp
|
| +++ b/Source/core/html/HTMLSelectElement.cpp
|
| @@ -1277,7 +1277,7 @@ void HTMLSelectElement::updateSelectedState(int listIndex, bool multi, bool shif
|
| void HTMLSelectElement::listBoxDefaultEventHandler(Event* event)
|
| {
|
| const Vector<HTMLElement*>& listItems = this->listItems();
|
| -
|
| + bool dragSelection = false;
|
| if (event->type() == EventTypeNames::mousedown && event->isMouseEvent() && toMouseEvent(event)->button() == LeftButton) {
|
| focus();
|
| // Calling focus() may cause us to lose our renderer, in which case do not want to handle the event.
|
| @@ -1323,7 +1323,7 @@ void HTMLSelectElement::listBoxDefaultEventHandler(Event* event)
|
| updateListBoxSelection(true);
|
| }
|
| }
|
| - event->setDefaultHandled();
|
| + dragSelection = true;
|
| }
|
| } else if (event->type() == EventTypeNames::mouseup && event->isMouseEvent() && toMouseEvent(event)->button() == LeftButton && renderer() && !toRenderBox(renderer())->autoscrollInProgress()) {
|
| // We didn't start this click/drag on any options.
|
| @@ -1332,7 +1332,9 @@ void HTMLSelectElement::listBoxDefaultEventHandler(Event* event)
|
| // This makes sure we fire dispatchFormControlChangeEvent for a single
|
| // click. For drag selection, onChange will fire when the autoscroll
|
| // timer stops.
|
| - listBoxOnChange();
|
| + if (!dragSelection) {
|
| + listBoxOnChange();
|
| + }
|
| } else if (event->type() == EventTypeNames::keydown) {
|
| if (!event->isKeyboardEvent())
|
| return;
|
|
|