Closed Bug 137015 Opened 22 years ago Closed 12 years ago

Mozilla steals focus with page loading

Categories

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

PowerPC
macOS
defect
Not set
minor

Tracking

()

RESOLVED WORKSFORME
Future

People

(Reporter: jpd, Unassigned)

References

Details

(Keywords: platform-parity)

Attachments

(1 file)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:0.9.9+)
Gecko/20020411
BuildID:    2002041105

When 2 browser windows are open, if you open a page in one window then move to
the other before the page loads, sometimes the first window will move forward.

Reproducible: Sometimes
Steps to Reproduce:
1. Open two browser windows
2. In the first window, go to any page that takes a while to load. I was able to
reproduce this several times using
http://apache.slashdot.org/article.pl?sid=02/04/06/0216250 
3. In the same window, click a link to go to another page.

Some of this might be unnecessary, but this can be a tricky thing to reproduce:

4. Click anywhere in the body of the page so that the URL in the location bar is
not highlighted.
5. Now go to your second window. Click anywhere in the body of the page so that
the URL in the location bar is not highlighted.
6. Go back to the first window. Click the "Back" button.
7. Quickly click to the second window before the first window loads the page.


Actual Results:  The first window steals focus, moving in front of the second
window.

Expected Results:  The first window should remain in the background while it
loads the page.

This seems similar to http://bugzilla.mozilla.org/show_bug.cgi?id=134317 but I'm
still seeing it while that claims to be fixed.
I forgot to mention that this is not tied to hitting the "back" button, it will
happen when loading pages for the first time too. Using the back button was just
a way that I was able to reproduce it.

*** This bug has been marked as a duplicate of 88810 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Bug 88810 is a vague request that turned into a meta bug.  This bug is neither a
vague request nor a meta bug, so it isn't a dup.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
I agree that this isn't a duplicate of 88810 and logic suggests that this bug is
a bug on which 88810 is dependent since it is a "superset" that includes this
one.  I will leave making the suggested change to someone who understands better
the bandwidth implications of dependency.

Dale
-> saari
Assignee: joki → saari
Target Milestone: --- → mozilla1.0
I see this bug too, but normally it is when I click on a link and then go to
another application by clicking on the window (not through the dock) like AIM
for example. Then when the page loads it covers everything else. This only
happens every once in awhile though.
QA Contact: madhur → rakeshmishra
This is fixed in recent builds. Reporter, could you install the latest nightly
build and try this problem again?
I still see it on the 2002042608 build, with a fresh profile and with an old
profile. The new quartz buttons are neat, not that that matters.
Don't you know Slashdot is bad for you? :-) Just kidding.

Worksforme Build ID: 2002042608 (0.9.9+) trunk Windows 98. Maybe this is another
one of the bad Mac focus bugs. 

Can someone confirm this on the Mac (or other) platform?

As this is currently unconfirmed, Milestone future.
Blocks: 140346
Keywords: pp
Target Milestone: mozilla1.0 → Future
Reporter: could you try with a recent build ?
Confirmed using FizzillaCFM/2002071808. I:

1. Opened two browser windows
2. In window one, accessed reporter's example URL,
[http://apache.slashdot.org/article.pl?sid=02/04/06/0216250]
3. While that was connecting, I switched to window two

When the URL was ready to start displaying in window one, it stole focus back
and made itself frontmost. It should not have done so.
Severity: major → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
QA Contact: rakeshmishra → trix
This bug is easy to reproduce; make a HTML-page with meta refresh tag on it.
Then try to browse some other web content with another browser window. Every
time the meta-refresh page refreshes itself, it steals focus from the other
window. And it's pretty annoying..
Sorry my bad.. The bug seems to be reproducable only when using IFrames. When an
IFrame refreshesh itself with Meta Refresh -tag, it steals focus from other
Mozilla windows. Even when the refresh occurs in a hidden tab, the window with
that IFrame -tab pops up. I'll try to come up with a demo page so that you'll
see what I mean exactly.
Is this still an issue in current trunk build?
here's a testcase for a meta refresh tag in an iframe.  I don't see a focus-stealing problem on Bon Echo 20060410 or Seamonkey 20060127.

Somebody correct the testcase if it's not right.
I have a very similar problem, only way to solve it is minimizing the firefoxwindow that is reloading or else i cant work with other programs simultaniously. I was looking through about:config for a boolean to switch off firefox ability to take focus, no luck. It should only be a line or 2 of code, simply reading the boolean and if set true, just make the function "take fucus" return a null value.
ok first of all i use slackware 11 with KDE. The page i reload is my gmail. while it reloads wich takes a good while i try working on another window. 3-4 times while the gmail page is loading firefox steals focus. Ive solved this problem in a way i dont like but is forced to temporarily by setting the KDE: control center ->  desktop -> window behavior -> advanced -> focus stealing prevention level  from low to extreme. 
Assignee: saari → nobody
QA Contact: trix → events
Frankie, can you reproduce on Mac?

In one hour of running on Windows, the testcase window stole focus only once. And I currently have a random focus stealing issue which could explain for the steal. So my conclusion is WFM.
Flags: needinfo?
WFM. The testcase does not steal focus on Mac FF 16.
Flags: needinfo?
Status: NEW → RESOLVED
Closed: 22 years ago12 years ago
Resolution: --- → WORKSFORME
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: