Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: fd13c500871d368b9f0b6d2f31a7ae57e4234e32 https://github.com/WebKit/WebKit/commit/fd13c500871d368b9f0b6d2f31a7ae57e4234e32 Author: Michael Catanzaro <mcatanz...@redhat.com> Date: 2023-01-26 (Thu, 26 Jan 2023)
Changed paths: M LayoutTests/fast/events/onchange-js-expected.txt M LayoutTests/fast/events/onchange-js.html M LayoutTests/fast/forms/onchange-setvalueforuser.html M Source/WebCore/html/HTMLInputElement.h M Source/WebCore/html/SearchInputType.cpp M Source/WebCore/html/shadow/TextControlInnerElements.cpp Log Message: ----------- HTMLInputElement::setValueForUser should dispatch an input event https://bugs.webkit.org/show_bug.cgi?id=226023 rdar://78571564 Reviewed by Aditya Keerthi. HTMLInputElement::setValueForUser is used to autofill form elements. It differs from setting the form value normally because it creates a change event to trick websites into detecting user input. However, this is not enough for some websites that only look for input events and not change events to decide whether the user modified the form. On such websites, the user has to enter an extra character and then delete it as a workaround. This fixes password autofill on https://my.cigna.com and https://myaccount.spireenergy.com in Epiphany. * LayoutTests/fast/events/onchange-js-expected.txt: * LayoutTests/fast/events/onchange-js.html: Add test to ensure change event is not sent until blur, since I've removed that from the onchange-setvalueforuser.html test. * LayoutTests/fast/forms/onchange-setvalueforuser.html: Change this test to not complain about the change event being sent before focus out. * Source/WebCore/html/HTMLInputElement.h: (WebCore::HTMLInputElement::setValueForUser): Fix the bug. * Source/WebCore/html/SearchInputType.cpp: (WebCore::SearchInputType::handleKeydownEvent): This seems to be using setValueForUser by mistake. Call setValue directly instead to avoid breaking fast/forms/search-cancel-button-events.html. * Source/WebCore/html/shadow/TextControlInnerElements.cpp: (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): Ditto. Canonical link: https://commits.webkit.org/259434@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes