mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:07:45 +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:
parent
9179d01915
commit
17505ea5d9
3 changed files with 18 additions and 7 deletions
|
@ -203,6 +203,9 @@ public:
|
|||
|
||||
void delete_text_range(TextRange);
|
||||
|
||||
bool text_is_secret() const { return m_text_is_secret; }
|
||||
void set_text_is_secret(bool text_is_secret);
|
||||
|
||||
protected:
|
||||
explicit TextEditor(Type = Type::MultiLine);
|
||||
|
||||
|
@ -387,6 +390,8 @@ private:
|
|||
Gfx::IntPoint m_last_mousemove_position;
|
||||
|
||||
RefPtr<Gfx::Bitmap> m_icon;
|
||||
|
||||
bool m_text_is_secret { false };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue