LibGUI: Clear inactive selections in DisplayOnly TextEditors

This commit is contained in:
thankyouverycool 2021-03-10 11:57:59 -05:00 committed by Andreas Kling
commit bc26d1093f
Notes: sideshowbarker 2024-07-18 21:29:49 +09:00

View file

@ -1133,6 +1133,8 @@ void TextEditor::focusin_event(FocusEvent& event)
void TextEditor::focusout_event(FocusEvent&) void TextEditor::focusout_event(FocusEvent&)
{ {
if (is_displayonly() && has_selection())
m_selection.clear();
stop_timer(); stop_timer();
if (on_focusout) if (on_focusout)
on_focusout(); on_focusout();