From 1ecbe021ff3c4e7f794f80d4918d12a64a011c7c Mon Sep 17 00:00:00 2001 From: Emanuel Rylke Date: Fri, 5 Dec 2014 22:03:02 +0100 Subject: [PATCH] Make the password input element show the correct number of dots for multibyte chars. --- components/script/dom/htmlinputelement.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs index f4867a97c308..20227cd397ee 100644 --- a/components/script/dom/htmlinputelement.rs +++ b/components/script/dom/htmlinputelement.rs @@ -115,7 +115,7 @@ impl LayoutHTMLInputElementHelpers for JS { .unwrap_or_else(|| "".to_string()), InputPassword => { let raw = get_raw_textinput_value(self); - String::from_char(raw.len(), '●') + String::from_char(raw.char_len(), '●') } _ => get_raw_textinput_value(self), }