Closed Bug 824162 Opened 13 years ago Closed 13 years ago

unable to focus into content in chat windows, iframe receives focus

Categories

(Firefox Graveyard :: SocialAPI, defect, P1)

19 Branch
x86
macOS
defect

Tracking

(firefox18 wontfix, firefox19+ fixed, firefox20+ fixed, firefox21 fixed)

RESOLVED FIXED
Firefox 21
Tracking Status
firefox18 --- wontfix
firefox19 + fixed
firefox20 + fixed
firefox21 --- fixed

People

(Reporter: mixedpuppy, Assigned: mixedpuppy)

References

Details

(Whiteboard: [qa:see comment 16])

Attachments

(1 file, 1 obsolete file)

- open 2 chat windows - focus into one - switch to a different application - move the app so the non-focused chat window is visible - click into the non-focused chat window - start typing If you do the last step fast enough, some of your message will appear in the chat window you clicked on, then focus gets moved back to the previously focused chat window, and your typing continues there. Sometimes it will switch back and forth more than once. I think this is a potential privacy issue: if you don't realize your focus changed, you may send a message to the wrong person.
FWIW, I can't repro this with the demo provider on Windows.
Attached patch chatfocus.patch (obsolete) — Splinter Review
This patch fixes some focus issues with the chat windows due to our advancing the focus during a focus event. Using our demo provider, focus handling is now working as expected with both keyboard and mouse, additionally supporting focus into a chat window when firefox is not the current application. This does not fix a facebook specific issue, which I now believe to be a bug on their end.
Attachment #698092 - Flags: feedback?(gavin.sharp)
I don't really understand the logic behind the ownerDocument check. From what I understand, we should just avoid calling chatbox.focus() entirely from under the selectedChat setter, when it is invoked from the focus handler. That would probably require introducing a selectChat(chat, setFocus) helper or somesuch.
Attached patch chatfocus.patchSplinter Review
This is actually all that is necessary to fix the focus problem.
Attachment #698092 - Attachment is obsolete: true
Attachment #698092 - Flags: feedback?(gavin.sharp)
Attachment #698151 - Flags: feedback?(gavin.sharp)
Attachment #698151 - Flags: feedback?(gavin.sharp) → review?(gavin.sharp)
Attachment #698151 - Flags: review?(gavin.sharp) → review+
Summary: strange focus switching it chat windows → Strange focus switching with chat windows
Assignee: nobody → mixedpuppy
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 21
Comment on attachment 698151 [details] [diff] [review] chatfocus.patch [Approval Request Comment] Bug caused by (feature/regressing bug #): User impact if declined: Testing completed (on m-c, etc.): Risk to taking this patch (and alternatives if risky): String or UUID changes made by this patch:
Attachment #698151 - Flags: approval-mozilla-beta?
Attachment #698151 - Flags: approval-mozilla-aurora?
(In reply to Shane Caraveo (:mixedpuppy) from comment #7) > Comment on attachment 698151 [details] [diff] [review] > chatfocus.patch Hmm, something here would probably be useful :) [Approval Request Comment] Bug caused by (feature/regressing bug #): User impact if declined: some focus problems when focusing onto chat windows, a contributor to focus switching between chat windows unexpectedly. Testing completed (on m-c, etc.): on m-c Risk to taking this patch (and alternatives if risky): low risk, affects only social chat windows String or UUID changes made by this patch: none
Comment on attachment 698151 [details] [diff] [review] chatfocus.patch Only affects chat windows, so we'll take this uplift.
Attachment #698151 - Flags: approval-mozilla-beta?
Attachment #698151 - Flags: approval-mozilla-beta+
Attachment #698151 - Flags: approval-mozilla-aurora?
Attachment #698151 - Flags: approval-mozilla-aurora+
Keywords: verifyme
I tried to verify the fix for this issue on Firefox 19.0 beta 5 on Mac OS X 10.7.5 Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:19.0) Gecko/20100101 Firefox/19.0 Build ID: 20130206083616 The focus is still switching from a chat window to another by following the steps from comment 0. The same behavior on Latest Aurora and Latest Nightly on Mac 10.7.5. I met this switch of chat window focus also on Windows 7 and Ubuntu 12.04 for Firefox 19.0 beta 5, Latest Aurora and Latest Nightly.
Should we set this to REOPEN and move to ALL?
(In reply to Virgil Dicu [:virgil] [QA] from comment #12) > Should we set this to REOPEN and move to ALL? As I said in comment 2, this patch does not address the facebook specific problem (where focus would switch back and forth between their chat windows). I believe that is a bug on their side. We did however, have a bug where, if firefox were not the top application, and you clicked into a chat window, we would focus the iframe rather than what you clicked on (e.g. textbox). That is what this patch addresses.
Summary: Strange focus switching with chat windows → unable to focus into content in chat windows, iframe receives focus
(In reply to Shane Caraveo (:mixedpuppy) from comment #13) > As I said in comment 2, this patch does not address the facebook specific > problem (where focus would switch back and forth between their chat > windows). I believe that is a bug on their side. Do we have a bug on file to track the issue on Facebook's end? We won't be able to verify this fixed 100% until it's 100% fixed.
Blocks: 839166
(In reply to Anthony Hughes, Mozilla QA (:ashughes) from comment #14) > (In reply to Shane Caraveo (:mixedpuppy) from comment #13) > > As I said in comment 2, this patch does not address the facebook specific > > problem (where focus would switch back and forth between their chat > > windows). I believe that is a bug on their side. > > Do we have a bug on file to track the issue on Facebook's end? We won't be > able to verify this fixed 100% until it's 100% fixed. Bug 839166 has been created for the issue on the provider side.
Okay, thanks Shane. Since we didn't find any regressions in our testing we won't block release on testing this further. We'll continue to track to test again once bug 839166 is fixed.
Whiteboard: [qa:see comment 16]
mass remove verifyme requests greater than 4 months old
Keywords: verifyme
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: