Opened 5 years ago

Last modified 5 years ago

#15404 new defect

wxRichTextCtrl : caret does not disappear when focus is lost (Mac)

Reported by: briceandre Owned by:
Priority: normal Milestone:
Component: wxRichText Version: 2.9.4
Keywords: Cc:
Blocked By: Blocking:
Patch: no


Dear all,

I have a problem with wxRichTextCtrl under mac (wxWidgets 2.9.4) : when leaving the control, the caret remains displayed.

After some investigation, I found that the cause of the bug is that the control never receives the wxFocusEvent when the focus is lost.

I did not found why the focus event is not received, but I found a simple workaround : when the caret blinks, I check if the control is still displayed. If no, I hide the caret.



PS: in order to apply the workaround described here above, one shall replace the function "wxRichTextCaret::Notify" by the following:

void wxRichTextCaret::Notify()

if (m_richTextCtrl &&





m_flashOn = !m_flashOn;



Change History (1)

comment:1 Changed 5 years ago by robind

See also #14142

Note: See TracTickets for help on using tickets.