1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:47:44 +00:00

LibGUI: Ensure that edit actions are disabled for password boxes

This ensures that the user can't copy/cut text from password boxes which
would reveal the password. It also makes sure that the undo/redo actions
stay disabled because it's difficult to reason about what these do
exactly without being able to see the result.
This commit is contained in:
Gunnar Beutner 2021-08-02 11:10:56 +02:00 committed by Linus Groh
parent 9179d01915
commit 17505ea5d9
3 changed files with 18 additions and 7 deletions

View file

@ -77,8 +77,7 @@ PasswordBox::PasswordBox()
: TextBox()
{
set_substitution_code_point('*');
undo_action().set_enabled(false);
redo_action().set_enabled(false);
set_text_is_secret(true);
}
}