From b27c892bc560831d912d98156d904b5cd2713c66 Mon Sep 17 00:00:00 2001
From: Vadim Savchuk <vsavchuk@productengine.com>
Date: Tue, 17 Aug 2010 22:34:50 +0300
Subject: [PATCH] EXT-8357 FIXED ESC key sometimes failing to de-focus the
 sidebar.

I've found out that the only case when pressing ESC doesn't transfer focus from side tray to game area is
when a flat list view (people, groups, teleport history, etc) is focused.
So, I fixed LLFlatListView to handle pressing ESC as expected.

Reviewed by Sergey Litovchuk at https://codereview.productengine.com/secondlife/r/862/

--HG--
branch : product-engine
---
 indra/llui/llflatlistview.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp
index 70558f8eb81..8de44455de0 100644
--- a/indra/llui/llflatlistview.cpp
+++ b/indra/llui/llflatlistview.cpp
@@ -669,6 +669,14 @@ BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask)
 			}
 			break;
 		}
+		case KEY_ESCAPE:
+		{
+			if (mask == MASK_NONE)
+			{
+				setFocus(FALSE); // pass focus to the game area (EXT-8357)
+			}
+			break;
+		}
 		default:
 			break;
 	}
-- 
GitLab