diff options
author | 2024-04-02 03:46:35 -0500 | |
---|---|---|
committer | 2024-04-02 08:46:35 +0000 | |
commit | 31d1d5fecbef50fa319cabd5d4194f1e4aaefa21 (patch) | |
tree | 5777be615e42f6e69279904fa1137854706de203 /widget/src/text_input.rs | |
parent | b17f8904821e25b26cc5a85cc42b47790472848c (diff) | |
download | iced-31d1d5fecbef50fa319cabd5d4194f1e4aaefa21.tar.gz iced-31d1d5fecbef50fa319cabd5d4194f1e4aaefa21.tar.bz2 iced-31d1d5fecbef50fa319cabd5d4194f1e4aaefa21.zip |
Check is_secure before a copy/cut from TextInput (#2366)
* Check is_secure before copy/cut on text_input
* run cargo fmt
Diffstat (limited to 'widget/src/text_input.rs')
-rw-r--r-- | widget/src/text_input.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/widget/src/text_input.rs b/widget/src/text_input.rs index 8cfb0408..a814df78 100644 --- a/widget/src/text_input.rs +++ b/widget/src/text_input.rs @@ -712,7 +712,8 @@ where match key.as_ref() { keyboard::Key::Character("c") - if state.keyboard_modifiers.command() => + if state.keyboard_modifiers.command() + && !self.is_secure => { if let Some((start, end)) = state.cursor.selection(&self.value) @@ -726,7 +727,8 @@ where return event::Status::Captured; } keyboard::Key::Character("x") - if state.keyboard_modifiers.command() => + if state.keyboard_modifiers.command() + && !self.is_secure => { if let Some((start, end)) = state.cursor.selection(&self.value) |