diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2015-08-15 05:06:21 +0530 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-08-18 18:37:12 +0530 |
commit | ac1b7a3896c5e05d9ae0af71fc3c82e73c9a05f4 (patch) | |
tree | 4b0bcb057a3322fc2191163af5a6f3d41df3d407 /components/script/textinput.rs | |
parent | 53e155e8ac62c4ce2f2e2bd930b15ecebd41465e (diff) | |
download | servo-ac1b7a3896c5e05d9ae0af71fc3c82e73c9a05f4.tar.gz servo-ac1b7a3896c5e05d9ae0af71fc3c82e73c9a05f4.zip |
Cleanup textinput, timers
Diffstat (limited to 'components/script/textinput.rs')
-rw-r--r-- | components/script/textinput.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/components/script/textinput.rs b/components/script/textinput.rs index 31fc7dc2e25..5ecf6a4f312 100644 --- a/components/script/textinput.rs +++ b/components/script/textinput.rs @@ -292,10 +292,11 @@ impl<T: ClipboardProvider> TextInput<T> { /// Deal with a newline input. pub fn handle_return(&mut self) -> KeyReaction { if !self.multiline { - return KeyReaction::TriggerDefaultAction; + KeyReaction::TriggerDefaultAction + } else { + self.insert_char('\n'); + KeyReaction::DispatchInput } - self.insert_char('\n'); - return KeyReaction::DispatchInput; } /// Select all text in the input control. |