diff options
author | Saurav Sachidanand <sauravsachidanand@gmail.com> | 2016-03-16 22:20:22 +0530 |
---|---|---|
committer | Saurav Sachidanand <sauravsachidanand@gmail.com> | 2016-03-16 22:20:22 +0530 |
commit | 0b593759df4e3597a9fc52fdfb08f0581e19340f (patch) | |
tree | 140d0e37e451947fd423fbc72365d9c2b6b26d5a /components/script/textinput.rs | |
parent | 6c5bfca53e6f61e4a7d60c8b5d65478e479c9bf5 (diff) | |
download | servo-0b593759df4e3597a9fc52fdfb08f0581e19340f.tar.gz servo-0b593759df4e3597a9fc52fdfb08f0581e19340f.zip |
Resets selection in textinput when its content is changed.
Adds a wpt test as well.
Diffstat (limited to 'components/script/textinput.rs')
-rw-r--r-- | components/script/textinput.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/components/script/textinput.rs b/components/script/textinput.rs index f407592a0ef..35b49ee57a4 100644 --- a/components/script/textinput.rs +++ b/components/script/textinput.rs @@ -497,6 +497,7 @@ impl<T: ClipboardProvider> TextInput<T> { }; self.edit_point.line = min(self.edit_point.line, self.lines.len() - 1); self.edit_point.index = min(self.edit_point.index, self.current_line_length()); + self.selection_begin = None; } pub fn get_absolute_insertion_point(&self) -> usize { |