MAINT-3151 (Issue with urls being autoclicked when holding left click into an unfocused textbox then dragging pointer over a url and releasing.)

master
MaximB ProductEngine 2013-09-23 09:14:53 +03:00
parent 8fa463113c
commit 3e934d5089
2 changed files with 5 additions and 2 deletions

View File

@ -1029,7 +1029,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);
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

View File

@ -721,7 +721,6 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
setCursorAtLocalPos( x, y, true );
startSelection();
}
gFocusMgr.setMouseCapture( this );
}
handled = TRUE;
@ -730,6 +729,10 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask)
// Delay cursor flashing
resetCursorBlink();
if (handled)
{
gFocusMgr.setMouseCapture( this );
}
return handled;
}