Bug 1712255 - Defer SetMaxLength in SetValueFromSetRangeText r=masayuki
Capping selection range in SetValue early makes the subsequent SetSelectionRange call unable to detect actual selection range change. This patch defers it so that select events can be consistently fired. Differential Revision: https://phabricator.services.mozilla.com/D115729
This commit is contained in:
@@ -660,6 +660,7 @@ void HTMLTextAreaElement::GetValueFromSetRangeText(nsAString& aValue) {
|
||||
nsresult HTMLTextAreaElement::SetValueFromSetRangeText(
|
||||
const nsAString& aValue) {
|
||||
return SetValueInternal(aValue, {ValueSetterOption::ByContentAPI,
|
||||
ValueSetterOption::BySetRangeTextAPI,
|
||||
ValueSetterOption::SetValueChanged});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user