Open Bug 164686 Opened 22 years ago Updated 2 years ago

document focus/blur events don't fire until page is clicked in (see comment 2)

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
All
defect

Tracking

()

People

(Reporter: danm.moz, Unassigned)

References

Details

Attachments

(1 file)

You can get Mozilla into a mode where document focus and blur events don't fire. The testcase is a window which updates little counters each time a focus or blur event hits the <body> element. Steps to reproduce: 1) Open the testcase into a new browser window. -- It should be the focused, active window. Note the focus count is 0. Hmm. suspicious. But maybe not a problem because of the way it was initialized. 2) Carefully clicking only in the titlebar of the new window, move it somewhere where you can keep an eye on the focus/blur event counters. 3) Click in the original window -- notice the focus/blur counters don't change. Click in the titlebar of the testcase window. Still no change. Repeat ad nauseum. 4) Click in the body of the testcase window. Now everything works. alternatively, 0) Save the testcase to a local file. 1) Launch into the browser. 2) Open a new browser window. -- wait! don't click in it; don't touch it -- 3) Drag the local testcase file into the new browser window on platforms that allow it, or actually File->Open in the new browser's menu seems to work. 4) Go to step 3 above. There are several similar variations. But many seemingly similar variations don't show the problem. This is not a terribly new bug; a trunk build from Aug 23 2002 does this for me, and I have a 0.9.8 build with the same problem.
Now that I've had a chance to try it live, ignore the first steps above to reproduce. They don't work. There should be a way to edit old bug entries. It's key to work with a window that's never been clicked in, so in the first case above, step (2) has already spoiled the bake sale. Use the alternative (second) set of steps in the initial bug comment. -- extra credit (yeah, a different bug) Note how the focus/blur counters climb. You get two each time when you think you'd get only one, plus an extra bonus third focus event if you focused the window by clicking in it.
Summary: document focus/blur events don't fire until page is clicked in → document focus/blur events don't fire until page is clicked in (see comment 2)
*** Bug 163757 has been marked as a duplicate of this bug. ***
*** Bug 163763 has been marked as a duplicate of this bug. ***
QA Contact: rakeshmishra → trix
.
Assignee: joki → saari
QA Contact: trix → ian
Assignee: saari → events
Assignee: events → nobody
QA Contact: ian → events
Component: Event Handling → User events and focus handling
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: