diff options
author | tigercosmos <phy.tiger@gmail.com> | 2017-12-14 21:23:06 +0800 |
---|---|---|
committer | tigercosmos <phy.tiger@gmail.com> | 2017-12-17 16:57:01 +0800 |
commit | 54c6028033d07d9104f58beb3d92bcc819600d93 (patch) | |
tree | eecab9c0387eb4cc46ba45b4b893401b262a7609 /components/script/dom/htmlinputelement.rs | |
parent | b93579a8f0e59c8102a243133455d8012e82e415 (diff) | |
download | servo-54c6028033d07d9104f58beb3d92bcc819600d93.tar.gz servo-54c6028033d07d9104f58beb3d92bcc819600d93.zip |
implement valid week string
Diffstat (limited to 'components/script/dom/htmlinputelement.rs')
-rwxr-xr-x | components/script/dom/htmlinputelement.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs index a951c49f80c..8c5699446ef 100755 --- a/components/script/dom/htmlinputelement.rs +++ b/components/script/dom/htmlinputelement.rs @@ -1005,6 +1005,12 @@ impl HTMLInputElement { *textinput.single_line_content_mut() = "".into(); } } + InputType::Week => { + let mut textinput = self.textinput.borrow_mut(); + if !textinput.single_line_content().is_valid_week_string() { + *textinput.single_line_content_mut() = "".into(); + } + } InputType::Color => { let mut textinput = self.textinput.borrow_mut(); |