In https://github.com/whatwg/html/issues/2328 tkent@ suggested new semantics for the select event on input/textarea in reaction to select() and various other selection-manipulating APIs. What we ended up with was only firing the select event when these change the selection. That was merged in https://github.com/whatwg/html/pull/2352. Web platform tests are available at https://github.com/w3c/web-platform-tests/pull/4799 Previously: https://bugs.chromium.org/p/chromium/issues/detail?id=449470 and https://bugs.chromium.org/p/chromium/issues/detail?id=637860
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/158aa81d2e11bd3cce433df4801cbffc9922d86d commit 158aa81d2e11bd3cce433df4801cbffc9922d86d Author: tkent <tkent@chromium.org> Date: Wed Mar 08 04:39:45 2017 INPUT/TEXTAREA elements: Dispatch 'select' event only if text selection is changed. * TextControlElement::cacheSelection() and setSelectionRange() This is the main change of this CL. We dispatch 'select' event only if new values are not identical to old values. * TextControlElement::setRangeText() Add a new flag to TextControlElement::setValue() in order to control text selection change in setValue(). setRangeText() doesn't want setValue() to change text selection. * web-platform-tests html/semantics/forms/textfieldselection/select-event.html - Mark this slow. This test make sure that |select| events are NOT dispatched. So it takes long time. - Correct "right" to "backward" to avoid the unknown keyword is recognized as the default keyword. - Shorten setTimeout value. * LayoutTests/fast/events/select-event-on-input-and-textarea.html Removed because this is covered by the above test. * LayoutTests/fast/events/select-event-on-input-recursive.html Removed. This test doesn't make sense since this CL. BUG= 696102 Review-Url: https://codereview.chromium.org/2735633006 Cr-Commit-Position: refs/heads/master@{#455380} [delete] https://crrev.com/5c4056a61c3d24b5df4ebdba406467b96ff68866/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/textfieldselection/select-event-expected.txt [modify] https://crrev.com/158aa81d2e11bd3cce433df4801cbffc9922d86d/third_party/WebKit/LayoutTests/external/wpt/html/semantics/forms/textfieldselection/select-event.html [delete] https://crrev.com/5c4056a61c3d24b5df4ebdba406467b96ff68866/third_party/WebKit/LayoutTests/fast/events/select-event-on-input-and-textarea-expected.txt [delete] https://crrev.com/5c4056a61c3d24b5df4ebdba406467b96ff68866/third_party/WebKit/LayoutTests/fast/events/select-event-on-input-and-textarea.html [delete] https://crrev.com/5c4056a61c3d24b5df4ebdba406467b96ff68866/third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive-expected.txt [delete] https://crrev.com/5c4056a61c3d24b5df4ebdba406467b96ff68866/third_party/WebKit/LayoutTests/fast/events/select-event-on-input-recursive.html [modify] https://crrev.com/158aa81d2e11bd3cce433df4801cbffc9922d86d/third_party/WebKit/Source/core/html/HTMLInputElement.cpp [modify] https://crrev.com/158aa81d2e11bd3cce433df4801cbffc9922d86d/third_party/WebKit/Source/core/html/HTMLInputElement.h [modify] https://crrev.com/158aa81d2e11bd3cce433df4801cbffc9922d86d/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp [modify] https://crrev.com/158aa81d2e11bd3cce433df4801cbffc9922d86d/third_party/WebKit/Source/core/html/HTMLTextAreaElement.h [modify] https://crrev.com/158aa81d2e11bd3cce433df4801cbffc9922d86d/third_party/WebKit/Source/core/html/TextControlElement.cpp [modify] https://crrev.com/158aa81d2e11bd3cce433df4801cbffc9922d86d/third_party/WebKit/Source/core/html/TextControlElement.h [modify] https://crrev.com/158aa81d2e11bd3cce433df4801cbffc9922d86d/third_party/WebKit/Source/core/html/forms/BaseButtonInputType.cpp [modify] https://crrev.com/158aa81d2e11bd3cce433df4801cbffc9922d86d/third_party/WebKit/Source/core/html/forms/BaseButtonInputType.h [modify] https://crrev.com/158aa81d2e11bd3cce433df4801cbffc9922d86d/third_party/WebKit/Source/core/html/forms/BaseCheckableInputType.cpp [modify] https://crrev.com/158aa81d2e11bd3cce433df4801cbffc9922d86d/third_party/WebKit/Source/core/html/forms/BaseCheckableInputType.h [modify] https://crrev.com/158aa81d2e11bd3cce433df4801cbffc9922d86d/third_party/WebKit/Source/core/html/forms/FileInputType.cpp [modify] https://crrev.com/158aa81d2e11bd3cce433df4801cbffc9922d86d/third_party/WebKit/Source/core/html/forms/FileInputType.h [modify] https://crrev.com/158aa81d2e11bd3cce433df4801cbffc9922d86d/third_party/WebKit/Source/core/html/forms/HiddenInputType.cpp [modify] https://crrev.com/158aa81d2e11bd3cce433df4801cbffc9922d86d/third_party/WebKit/Source/core/html/forms/HiddenInputType.h [modify] https://crrev.com/158aa81d2e11bd3cce433df4801cbffc9922d86d/third_party/WebKit/Source/core/html/forms/InputType.cpp [modify] https://crrev.com/158aa81d2e11bd3cce433df4801cbffc9922d86d/third_party/WebKit/Source/core/html/forms/InputType.h [modify] https://crrev.com/158aa81d2e11bd3cce433df4801cbffc9922d86d/third_party/WebKit/Source/core/html/forms/NumberInputType.cpp [modify] https://crrev.com/158aa81d2e11bd3cce433df4801cbffc9922d86d/third_party/WebKit/Source/core/html/forms/NumberInputType.h [modify] https://crrev.com/158aa81d2e11bd3cce433df4801cbffc9922d86d/third_party/WebKit/Source/core/html/forms/TextFieldInputType.cpp [modify] https://crrev.com/158aa81d2e11bd3cce433df4801cbffc9922d86d/third_party/WebKit/Source/core/html/forms/TextFieldInputType.h
Comment 1 by tkent@chromium.org
, Feb 26 2017Status: Available (was: Untriaged)