mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Add special case directionality of phone input
This commit is contained in:
parent
35d340daba
commit
6188116090
2 changed files with 6 additions and 1 deletions
|
@ -787,6 +787,12 @@ impl HTMLElement {
|
|||
return Some("rtl".to_owned());
|
||||
}
|
||||
|
||||
if let Some(input) = self.downcast::<HTMLInputElement>() {
|
||||
if input.input_type() == InputType::Tel {
|
||||
return Some("ltr".to_owned());
|
||||
}
|
||||
}
|
||||
|
||||
if element_direction == "auto" {
|
||||
if let Some(directionality) = self
|
||||
.downcast::<HTMLInputElement>()
|
||||
|
|
|
@ -330,7 +330,6 @@ impl HTMLInputElement {
|
|||
|
||||
pub fn auto_directionality(&self) -> Option<String> {
|
||||
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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue