From afe23cb4d48ca21d30f41f7707aed6ef2f0c2aee Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 5 Feb 2014 11:29:38 +0000 Subject: [PATCH] Return true from OnCellClicked if the event was processed, otherwise further processing will use default behaviour which may negate the effect of the event handler. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/html/htmlwin.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/html/htmlwin.cpp b/src/html/htmlwin.cpp index 4410fa73c3..f9c78d6af2 100644 --- a/src/html/htmlwin.cpp +++ b/src/html/htmlwin.cpp @@ -254,7 +254,10 @@ bool wxHtmlWindowMouseHelper::OnCellClicked(wxHtmlCell *cell, wxASSERT_MSG( cell, wxT("can't be called with NULL cell") ); - cell->ProcessMouseClick(m_interface, ev.GetPoint(), ev.GetMouseEvent()); + // If we don't return true, HTML listboxes will always think that they should take + // the focus + if (cell->ProcessMouseClick(m_interface, ev.GetPoint(), ev.GetMouseEvent())) + return true; } // true if a link was clicked, false otherwise