From 2af0ad0b8467fff0e697946f0eb9b3560f18dccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Qu=C3=A8ze?= Date: Fri, 7 Oct 2011 00:57:14 +0200 Subject: [PATCH] Bug 954493 - Focus broken when renaming a contact. --- im/content/blist.css | 3 ++- im/content/blist.js | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/im/content/blist.css b/im/content/blist.css index 17c21a8b4c..5be1fcfa85 100644 --- a/im/content/blist.css +++ b/im/content/blist.css @@ -40,6 +40,7 @@ contact { -moz-box-align: center; } contact[open], +contact[aliasing], #buddylistbox:focus > contact[selected] { -moz-binding: url("chrome://instantbird/content/contact.xml#contact-big"); -moz-box-orient: vertical; @@ -146,7 +147,7 @@ tooltip[type="buddy"] { group:not([id="group-1"]):hover .hideGroupButton, contact[cansend]:hover .startChatBubble, -contact[cansend][selected] .startChatBubble { +#buddylistbox:focus > contact[cansend][selected] .startChatBubble { display: -moz-box; } diff --git a/im/content/blist.js b/im/content/blist.js index 7ea1b58aef..29ffe84e25 100644 --- a/im/content/blist.js +++ b/im/content/blist.js @@ -760,7 +760,10 @@ var buddyList = { // Handle key pressing keyPress: function bl_keyPress(aEvent) { - var item = aEvent.target.selectedItem; + let target = aEvent.target; + while (target && target.localName != "richlistbox") + target = target.parentNode; + var item = target.selectedItem; if (!item || !item.parentNode) // empty list or item no longer in the list return; item.keyPress(aEvent);