Skip to content

Commit 5d07b45

Browse files
kjaroshDinnerbone
authored andcommitted
core: Prevent copying and cutting text from a password field
1 parent aae6ad5 commit 5d07b45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/display_object/edit_text.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1444,7 +1444,7 @@ impl<'gc> EditText<'gc> {
14441444
| TextControlCode::SelectRightDocument
14451445
| TextControlCode::SelectAll => self.is_selectable(),
14461446
TextControlCode::Copy | TextControlCode::Cut => {
1447-
!selection.is_caret()
1447+
!self.is_password() && !selection.is_caret()
14481448
}
14491449
TextControlCode::Paste => context.ui.clipboard_available(),
14501450
_ => true,

0 commit comments

Comments
 (0)