Bug 1801380 - Don't call RecomputeDirectionality() if the element has dir=auto. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D162462
This commit is contained in:
Jonathan Kew
2022-11-19 21:06:04 +00:00
parent 5f162ea311
commit d23245129e
3 changed files with 4 additions and 2 deletions

View File

@@ -4485,8 +4485,8 @@ void HTMLInputElement::HandleTypeChange(FormControlType aNewType,
// Changing type may affect directionality because of the special-case for
// <input type=tel>, as specified in
// https://html.spec.whatwg.org/multipage/dom.html#the-directionality
if (oldType == FormControlType::InputTel ||
mType == FormControlType::InputTel) {
if (!HasDirAuto() && (oldType == FormControlType::InputTel ||
mType == FormControlType::InputTel)) {
RecomputeDirectionality(this, aNotify);
}