only force prompt focus if mouse is not active

This commit is contained in:
thecozies 2024-05-01 10:17:16 -05:00
parent 78fcab1822
commit e8b54842f2

View file

@ -1055,13 +1055,15 @@ struct UIContext {
Rml::Element* focused = current_document->GetFocusLeafNode();
// Check if unfocused or current focus isn't either prompt button
if (
focused == nullptr || (
focused != current_document->GetElementById("prompt__cancel-button") &&
focused != current_document->GetElementById("prompt__confirm-button")
)
) {
ctx->shouldFocus = true;
if (mouse_is_active == false) {
if (
focused == nullptr || (
focused != current_document->GetElementById("prompt__cancel-button") &&
focused != current_document->GetElementById("prompt__confirm-button")
)
) {
ctx->shouldFocus = true;
}
}
if (!ctx->shouldFocus) {