Make the password input element show the correct number of dots for multibyte chars.

This commit is contained in:
Emanuel Rylke 2014-12-05 22:03:02 +01:00
parent 0316100785
commit 1ecbe021ff

View file

@ -115,7 +115,7 @@ impl LayoutHTMLInputElementHelpers for JS<HTMLInputElement> {
.unwrap_or_else(|| "".to_string()), .unwrap_or_else(|| "".to_string()),
InputPassword => { InputPassword => {
let raw = get_raw_textinput_value(self); let raw = get_raw_textinput_value(self);
String::from_char(raw.len(), '●') String::from_char(raw.char_len(), '●')
} }
_ => get_raw_textinput_value(self), _ => get_raw_textinput_value(self),
} }