diff options
author | paavininanda <paavininanda@gmail.com> | 2018-02-21 01:29:33 +0530 |
---|---|---|
committer | paavininanda <paavininanda@gmail.com> | 2018-02-23 02:37:11 +0530 |
commit | 87e7b1ee7a7e59900eddc169e6c1cb7484cd2b2d (patch) | |
tree | 693faf146b04b3458df1d76fb8a1dfe6918776fb /components/script/textinput.rs | |
parent | b517410a34a3fc561a59d9a49da1f47a509f15e3 (diff) | |
download | servo-87e7b1ee7a7e59900eddc169e6c1cb7484cd2b2d.tar.gz servo-87e7b1ee7a7e59900eddc169e6c1cb7484cd2b2d.zip |
Correct default selectionStart and selectionEnd
Diffstat (limited to 'components/script/textinput.rs')
-rw-r--r-- | components/script/textinput.rs | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/components/script/textinput.rs b/components/script/textinput.rs index 3f26873ca24..1133c9cdd1c 100644 --- a/components/script/textinput.rs +++ b/components/script/textinput.rs @@ -448,9 +448,7 @@ impl<T: ClipboardProvider> TextInput<T> { return; } - let col = self.lines[self.edit_point.line][..self.edit_point.index].chars().count(); - self.edit_point.line = target_line as usize; self.edit_point.index = len_of_first_n_chars(&self.lines[self.edit_point.line], col); self.assert_ok_selection(); @@ -887,7 +885,6 @@ impl<T: ClipboardProvider> TextInput<T> { if let Some(origin) = self.selection_origin { self.selection_origin = Some(origin.constrain_to(&self.lines)); } - self.assert_ok_selection(); } |