Check is_secure before a copy/cut from TextInput (#2366)
* Check is_secure before copy/cut on text_input * run cargo fmt
This commit is contained in:
parent
b17f890482
commit
31d1d5fecb
1 changed files with 4 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue