Bug 1680951 - Do not scroll when calling select() r=masayuki
This is intended to be a hotfix for the URL bar regression. Ideally there should be a spec or this behavior should be removed completely. Previously select() scrolled back to the start position before the regression, but this fix does not restore that behavior. Differential Revision: https://phabricator.services.mozilla.com/D98972
This commit is contained in:
@@ -3055,11 +3055,8 @@ void HTMLInputElement::Select() {
|
||||
|
||||
// Directly call TextControlState::SetSelectionRange because
|
||||
// HTMLInputElement::SetSelectionRange only applies to fewer types
|
||||
// TODO(krosylight): This should pass eNone per the spec, but we don't support
|
||||
// it yet. See bug 1541454.
|
||||
state->SetSelectionRange(0, UINT32_MAX,
|
||||
nsITextControlFrame::SelectionDirection::eForward,
|
||||
IgnoredErrorResult());
|
||||
state->SetSelectionRange(0, UINT32_MAX, Optional<nsAString>(), IgnoreErrors(),
|
||||
TextControlState::ScrollAfterSelection::No);
|
||||
}
|
||||
|
||||
void HTMLInputElement::DispatchSelectEvent(nsPresContext* aPresContext) {
|
||||
|
||||
Reference in New Issue
Block a user