From ea8e1a48eebf3a213a806c625c93ffabe7781c07 Mon Sep 17 00:00:00 2001 From: Gottfried Leibniz <37632412+gottfriedleibniz@users.noreply.github.com> Date: Mon, 6 May 2024 14:53:25 -0300 Subject: [PATCH] fix(nui/core): send mouseUp Regression caused by: 61eccbe5b20df911036f70d60d4455274214a1ab. The mouse release event is required - just need to ensure the click-count is non-zero. --- code/components/nui-core/src/CefInput.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/components/nui-core/src/CefInput.cpp b/code/components/nui-core/src/CefInput.cpp index cd9acfb96c..b18f016167 100644 --- a/code/components/nui-core/src/CefInput.cpp +++ b/code/components/nui-core/src/CefInput.cpp @@ -495,13 +495,13 @@ static HookFunction initFunction([] () auto browser = GetFocusBrowser(); - if (browser && lastClickCount > 0) + if (browser) { CefMouseEvent mouse_event; mouse_event.x = x; mouse_event.y = y; mouse_event.modifiers = GetCefMouseModifiers(); - browser->GetHost()->SendMouseClickEvent(mouse_event, btnType, true, lastClickCount); + browser->GetHost()->SendMouseClickEvent(mouse_event, btnType, true, std::max(1, lastClickCount)); } } }