Closed Bug 808501 Opened 13 years ago Closed 13 years ago

Focusing chat bar focuses incorrect chat

Categories

(Firefox Graveyard :: SocialAPI, defect)

17 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 19

People

(Reporter: markh, Assigned: jaws)

References

Details

Attachments

(1 file, 1 obsolete file)

STR: * Open 2 chats. * Focus the first chat you opened. * Optional: move focus to URL bar or similar. * Press Accel+Shift+C - the keyboard shortcut to focus the chatbar. Actual: * Focus is moved from the first opened chat to the second. Expected: * Focus remains in the previously focused first chat. If you use the sidebar to click on a user and select a different chat, then this new chat always gets the new focus. IOW, it isn't actually the "most recently opened" chat that always gets focus, it's the "most recently selected via the sidebar" chat which does. FWIW, while I can see the second chat get focus in this case, I can't see where we actually set focus. Is it possible the facebook content is managing to shift focus?
(In reply to Mark Hammond (:markh) from comment #0) > FWIW, while I can see the second chat get focus in this case, I can't see > where we actually set focus. Is it possible the facebook content is > managing to shift focus? When using the keyboard shortcut, the focus is set by http://hg.mozilla.org/mozilla-central/diff/cd2b8f31f59b/browser/base/content/browser-social.js. I do believe that the Facebook content is also calling element.focus() after onload.
Blocks: 808235
Assignee: nobody → jaws
Status: NEW → ASSIGNED
Attached patch Patch (obsolete) — Splinter Review
This patch returns focus to the selected chat when the keyboard shortcut is used.
Attachment #681739 - Flags: review?(mhammond)
Attached patch Patch v1.1Splinter Review
After talking on IRC, I updated this patch to not adjust focus if there aren't any chatboxes in the DOM. If there are, then selectedChat will be non-null.
Attachment #681739 - Attachment is obsolete: true
Attachment #681739 - Flags: review?(mhammond)
Attachment #681740 - Flags: review?(mhammond)
Comment on attachment 681740 [details] [diff] [review] Patch v1.1 Review of attachment 681740 [details] [diff] [review]: ----------------------------------------------------------------- untested by me, but looks good.
Attachment #681740 - Flags: review?(mhammond) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 19
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: