summaryrefslogtreecommitdiffstats
path: root/widget
diff options
context:
space:
mode:
authorLibravatar Aaron McGuire <89317236+Aaron-McGuire@users.noreply.github.com>2024-04-02 03:46:35 -0500
committerLibravatar GitHub <noreply@github.com>2024-04-02 08:46:35 +0000
commit31d1d5fecbef50fa319cabd5d4194f1e4aaefa21 (patch)
tree5777be615e42f6e69279904fa1137854706de203 /widget
parentb17f8904821e25b26cc5a85cc42b47790472848c (diff)
downloadiced-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')
-rw-r--r--widget/src/text_input.rs6
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)