aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/textinput.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-05-24 16:08:02 -0500
committerGitHub <noreply@github.com>2017-05-24 16:08:02 -0500
commit8ae546f7ea158466441987d4a86c5c440f0a5e00 (patch)
treeb2eaae4c7b661879577a5bdddff9b811ef39bc4e /components/script/textinput.rs
parentbb310efbb9e84cf0bd44170c4e08bac664f0ce86 (diff)
parent8c9c506f9015da5a23858a6eaf75bd7ee187a01e (diff)
downloadservo-8ae546f7ea158466441987d4a86c5c440f0a5e00.tar.gz
servo-8ae546f7ea158466441987d4a86c5c440f0a5e00.zip
Auto merge of #17027 - Manishearth:rollup, r=Manishearth
Rollup of 9 pull requests - Successful merges: #16993, #17000, #17010, #17013, #17014, #17017, #17019, #17020, #17022 - Failed merges: <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17027) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/textinput.rs')
-rw-r--r--components/script/textinput.rs20
1 files changed, 9 insertions, 11 deletions
diff --git a/components/script/textinput.rs b/components/script/textinput.rs
index 144be9dbd78..b508ba2806c 100644
--- a/components/script/textinput.rs
+++ b/components/script/textinput.rs
@@ -632,14 +632,6 @@ impl<T: ClipboardProvider> TextInput<T> {
self.insert_char(c);
KeyReaction::DispatchInput
},
- #[cfg(target_os = "macos")]
- (None, Key::Home) => {
- KeyReaction::RedrawSelection
- },
- #[cfg(target_os = "macos")]
- (None, Key::End) => {
- KeyReaction::RedrawSelection
- },
(None, Key::Delete) => {
self.delete_char(Direction::Forward);
KeyReaction::DispatchInput
@@ -694,12 +686,18 @@ impl<T: ClipboardProvider> TextInput<T> {
},
(None, Key::Enter) | (None, Key::KpEnter) => self.handle_return(),
(None, Key::Home) => {
- self.edit_point.index = 0;
+ #[cfg(not(target_os = "macos"))]
+ {
+ self.edit_point.index = 0;
+ }
KeyReaction::RedrawSelection
},
(None, Key::End) => {
- self.edit_point.index = self.current_line_length();
- self.assert_ok_selection();
+ #[cfg(not(target_os = "macos"))]
+ {
+ self.edit_point.index = self.current_line_length();
+ self.assert_ok_selection();
+ }
KeyReaction::RedrawSelection
},
(None, Key::PageUp) => {