From 9c0973f787fd51c6e88da9e7ab7a7d707c4ecca4 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 4 Jan 2022 15:00:41 +0100 Subject: [PATCH] FIRE-31179: Fix double-clicking on friend list item might execute underlying URL in opened IM window --- indra/llui/lltextbase.cpp | 5 +---- indra/llui/lltextbox.cpp | 4 +++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 2c192df2a9..be20b8d9b4 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1145,10 +1145,7 @@ BOOL LLTextBase::handleMouseDown(S32 x, S32 y, MASK mask) BOOL LLTextBase::handleMouseUp(S32 x, S32 y, MASK mask) { LLTextSegmentPtr cur_segment = getSegmentAtLocalPos(x, y); - // FIRE-23523 left click does not work on notifications with embedded links - // if (hasMouseCapture() && cur_segment && cur_segment->handleMouseUp(x, y, mask)) - if (cur_segment && cur_segment->handleMouseUp(x, y, mask)) - // + if (hasMouseCapture() && cur_segment && cur_segment->handleMouseUp(x, y, mask)) { // Did we just click on a link? if (mURLClickSignal diff --git a/indra/llui/lltextbox.cpp b/indra/llui/lltextbox.cpp index d0c82faf94..c2e399cacc 100644 --- a/indra/llui/lltextbox.cpp +++ b/indra/llui/lltextbox.cpp @@ -35,6 +35,8 @@ #include "llurlregistry.h" #include "llstyle.h" +#include "llmodaldialog.h" + static LLDefaultChildRegistry::Register r("text"); // Compiler optimization, generate extern template @@ -71,7 +73,7 @@ BOOL LLTextBox::handleMouseDown(S32 x, S32 y, MASK mask) // Route future Mouse messages here preemptively. (Release on mouse up.) // FIRE-10172: This interferes with the scroll bar buttons. //gFocusMgr.setMouseCapture( this ); - if (!gFocusMgr.getMouseCapture()) + if (!gFocusMgr.getMouseCapture() || getParentByType()) gFocusMgr.setMouseCapture( this ); // }