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
Родитель 4f69b540a6
Коммит 75c3be2a1e
3 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -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);
}

Просмотреть файл

@ -0,0 +1 @@
<input dir="auto" type="tel">

Просмотреть файл

@ -95,3 +95,4 @@ load 1724816.html
load 1785933.html
load 1787671.html
load 1789475.html
load 1801380.html