Skip to content

Commit 8fd8d49

Browse files
committed
core: Prevent copying and cutting text from a password field
1 parent febcd36 commit 8fd8d49

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/src/display_object/edit_text.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,9 @@ impl<'gc> EditText<'gc> {
14391439
| TextControlCode::SelectRightLine
14401440
| TextControlCode::SelectRightDocument
14411441
| TextControlCode::SelectAll => self.is_selectable(),
1442-
TextControlCode::Copy | TextControlCode::Cut => !selection.is_caret(),
1442+
TextControlCode::Copy | TextControlCode::Cut => {
1443+
!self.is_password() && !selection.is_caret()
1444+
}
14431445
_ => true,
14441446
}
14451447
}

0 commit comments

Comments
 (0)