Closed Bug 310825 Opened 19 years ago Closed 19 years ago

window.focus() in a background tab can steal focus from foreground tab

Categories

(SeaMonkey :: Tabbed Browser, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.8rc1

People

(Reporter: martijn.martijn, Assigned: jst)

References

Details

(Keywords: testcase, verified1.8, Whiteboard: [sg:fix][HAVE FIX])

Attachments

(2 files)

See upcoming testcase. It uses almost the same code as in bug 299677, but now window.focus() is used, which still successfully can steal focus from another tab.
Attached file testcase
Confirmed using Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20051003 Firefox/1.6a1.
Flags: blocking1.8b5?
Whiteboard: [sg:fix]
Martijn, can you get a patch together tonight? jst, if you get cycles, can you help here?
*** Bug 272867 has been marked as a duplicate of this bug. ***
Johnny, can you dig into this for us?
Assignee: nobody → jst
rc1 blocker.
Flags: blocking1.8rc1+
Flags: blocking1.8b5?
Flags: blocking1.8b5-
Also see the same thing as the testcase in branch. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b5) Gecko/20051012 Firefox/1.4.1 ID:2005101205
*** Bug 312311 has been marked as a duplicate of this bug. ***
is this a dupe of bug 306245?
This fixes this problem pretty much in the same way we "fixed" bug 124750.
Attachment #199614 - Flags: superreview?(dveditz)
Attachment #199614 - Flags: review?(mrbkap)
Status: NEW → ASSIGNED
OS: Windows XP → All
Hardware: PC → All
Whiteboard: [sg:fix] → [sg:fix][HAVE FIX]
Target Milestone: --- → mozilla1.8rc1
Comment on attachment 199614 [details] [diff] [review] Fix to ignore focus calls on a hidden tab. r=mrbkap
Attachment #199614 - Flags: review?(mrbkap) → review+
Comment on attachment 199614 [details] [diff] [review] Fix to ignore focus calls on a hidden tab. sr=dveditz
Attachment #199614 - Flags: superreview?(dveditz) → superreview+
doesn't this break window.focus() on a minimized window?
Attachment #199614 - Flags: approval1.8rc1?
Johnny, can you respond to Asaf's question? Time is running out for this release and we need this to land ASAP.
(In reply to comment #7) > Also see the same thing as the testcase in branch. > > Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b5) Gecko/20051012 > Firefox/1.4.1 ID:2005101205 > > > Can someone change version field to something to include trunk and branch?
(In reply to comment #13) > doesn't this break window.focus() on a minimized window? I just tested that and a minimized window is still brought back into focus with this patch applied. So no, this doesn't break that. Landed on the trunk now.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Keywords: qawanted
Attachment #199614 - Flags: approval1.8rc1? → approval1.8rc1+
jst checked this into MOZILLA_1_8_BRANCH at 2005-10-18 16:27.
Keywords: fixed1.8
v.fixed on both trunk (Linux 20051020) and branch (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b5) Gecko/20051020 Firefox/1.5) using the testcase... tab doesn't steal focus/input.
Status: RESOLVED → VERIFIED
Keywords: fixed1.8verified1.8
Keywords: qawanted
*** Bug 321586 has been marked as a duplicate of this bug. ***
Depends on: 416771
Product: Core → SeaMonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: