diff --git a/components/script/dom/htmlelement.rs b/components/script/dom/htmlelement.rs index 9384fba1472..3bf4307b826 100644 --- a/components/script/dom/htmlelement.rs +++ b/components/script/dom/htmlelement.rs @@ -787,6 +787,12 @@ impl HTMLElement { return Some("rtl".to_owned()); } + if let Some(input) = self.downcast::() { + if input.input_type() == InputType::Tel { + return Some("ltr".to_owned()); + } + } + if element_direction == "auto" { if let Some(directionality) = self .downcast::() diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs index bc503fd1fda..07e5059a648 100755 --- a/components/script/dom/htmlinputelement.rs +++ b/components/script/dom/htmlinputelement.rs @@ -330,7 +330,6 @@ impl HTMLInputElement { pub fn auto_directionality(&self) -> Option { match self.input_type() { - InputType::Tel => return Some("ltr".to_owned()), InputType::Text | InputType::Search | InputType::Url | InputType::Email => { let value: String = self.Value().to_string(); Some(HTMLInputElement::directionality_from_value(&value))