diff --git a/indra/newview/llviewerinput.cpp b/indra/newview/llviewerinput.cpp
index a43b49a3169145e6b996f86ed0f0b72137f2aef0..6629a2ffac3a17b9252b35760f0635352a46ad97 100644
--- a/indra/newview/llviewerinput.cpp
+++ b/indra/newview/llviewerinput.cpp
@@ -1065,11 +1065,15 @@ bool LLViewerInput::handleGlobalBindsKeyUp(KEY key, MASK mask)
 bool LLViewerInput::handleGlobalBindsMouse(EMouseClickType clicktype, MASK mask, bool down)
 {
     bool res = false;
+    S32 mode = getMode();
     if (down)
     {
-        S32 mode = getMode();
         res = scanMouse(mGlobalMouseBindings[mode], mGlobalMouseBindings[mode].size(), clicktype, mask, MOUSE_STATE_DOWN, true);
     }
+    else
+    {
+        res = scanMouse(mGlobalMouseBindings[mode], mGlobalMouseBindings[mode].size(), clicktype, mask, MOUSE_STATE_UP, true);
+    }
     return res;
 }