aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/textinput.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/textinput.rs')
-rw-r--r--components/script/textinput.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/components/script/textinput.rs b/components/script/textinput.rs
index 1817667aa88..c2a5575e9ec 100644
--- a/components/script/textinput.rs
+++ b/components/script/textinput.rs
@@ -877,6 +877,13 @@ impl<T: ClipboardProvider> TextInput<T> {
self.select_all();
KeyReaction::RedrawSelection
})
+ .shortcut(CMD_OR_CONTROL, 'X', || {
+ if let Some(text) = self.get_selection_text() {
+ self.clipboard_provider.set_clipboard_contents(text);
+ self.delete_char(Direction::Backward);
+ }
+ KeyReaction::DispatchInput
+ })
.shortcut(CMD_OR_CONTROL, 'C', || {
if let Some(text) = self.get_selection_text() {
self.clipboard_provider.set_clipboard_contents(text);