Skip to content

Commit

Permalink
Merge branch 'fix/input' into 'master'
Browse files Browse the repository at this point in the history
fix(nui/core): send mouseUp

See merge request cfx/fivem!317
  • Loading branch information
Osmium committed May 6, 2024
2 parents 9f2ea4c + ea8e1a4 commit 1879d0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/components/nui-core/src/CefInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
}
Expand Down

0 comments on commit 1879d0c

Please sign in to comment.