Closed Bug 114930 Opened 22 years ago Closed 22 years ago

Windows steal focus (get raised) after finishing page load


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

Not set





(Reporter: diego, Assigned: bryner)




(Keywords: regression)

Just open any page that takes a tad longer to load (a buglist comes to mind) and
raise another mozilla window.  After the page finishes loading it pops back up.
 This is unlike pages stealing focus on starting to load a page.  It happens
after finishing the load.

I am using Linux 2001121208, it did not happen with 2001121108.

I hope this is not a dupe, I searched hard and asked on #mozillazine.  rkaa
claims that the following pref fixes this behavior:

user_pref("mozilla.widget.raise-on-setfocus", false);

If this is supposed to be default behavior now, please turn it back off and add
an entry to the prefs panel.  I volunteer to come up with a patch in that case.

I set severity to major since this is ultra-annoying and highly visible.
I think this is actually a dupe of bug 105225.
Not at all, Warner.  This is not a problem when a page _starts_ loading, but
when it _finishes_.
confirming with win2k build 20011212..

This is a regression from the last 24-48h
Ever confirmed: true
OS: Linux → All
Hardware: PC → All
Diego, sorry.  I originally was going to dupe it against one of the old
focus-stealing bugs, but that had been duped against bug 105225, so I just put
that in without reading it in detail.

wfm in 2001121108 linux
broken in 2001121206 linux
user_pref("mozilla.widget.raise-on-setfocus", false); doesn't work - just found out.
backing out bryner's fix for bug 103758 fixes this for me.
Blocks: 88810
I also have this bug here. Mozilla 2001121203 on windows XP.
I have this bug on Windows 98 Build 2001121203
Even more noticable: it will actually un-minimize a window too.
Target Milestone: --- → mozilla0.9.7
Blocks: 114455
To bryner for real.
Assignee: joki → bryner
2001121219 OS/2

Don't know whether this is same, related, or distinct. I open only one Mozilla
browser instance always, and rarely use tabs or sidebar. I set a page to
loading, then switch focus to another app awaiting load completion. When page
completes loading, Mozilla browser steals focus from the other app.
yup, that is the behavior as summary states.
Reading past the summary into the full description and subsequent comments there
was previously *no* mention made of stealing focus from anything other than
another Mozilla window.
I'm testing on Win98. Focus is stolen only from another Mozilla window. There is
no affect on the fronted application.
In Win98, with build 2001121303, it appears to steal focus from anything else,
not just other Mozilla windows.  If you minimize a Mozilla window while it's
loading a page, it will pop right back at you when it finishes loading, no
matter what your focus may be on at the time.  It also pops back as a window,
even if you had it in maximized mode before minimizing, which is different from
the behavior when you click on the taskbar item for it, where it remembers its
maximized status and comes back that way.  It's very annoying to have Mozilla
windows come back at me when I've minimized them, and especially to have them
come up in a different size from the full-screen browsing window I was using.

quick question: when you backed out that patch, can you see the problem in bug
bryner, what's going on with this regression?
Dennis: I'll see on monday (when I come back on my work machine)
FWIW: I don't see this bug on linux anymore. Fresh CVS and pref as stated in
comment 6. But i saw the bug - same prefs - only two days ago.
*** Bug 115445 has been marked as a duplicate of this bug. ***
mozilla/ xpfe/ browser/ resources/ content/ navigator.js

1.417  Dec 15 17:21  Backing out fix for bug 103758 to fix
focus regressions.
This works with 2001-12-16-03 on Linux. Resolving.
Closed: 22 years ago
Resolution: --- → FIXED
On WinXP with build 2001121608 the browser no longer steals focus, but mailnews
does.  Have a browser open, switch to mailnews, select an unloaded folder, and
alt-tab back to the browser; mailnews steals the focus when the folder has
completed loading.

Resolution: FIXED → ---
That is most definitely a different bug.  Please file it separately, and assign
to mailnews, not me :)
Closed: 22 years ago22 years ago
Resolution: --- → FIXED
reagarding mailnews stealing focus, you are probably referring to
Oh happy day, the problem is gone 2001121606 Linux  ---> VERIFIED
Verified also in 2001121608 (Win98).

Related or not, bug 114976 (another focus-related bug) seems also to have gone
away in this build.
Version 2001121608 (WinNT 4) is still broken for me.  I open a link in a new
window, click the original window (using the window-bar at the bottom of the
screen), and sometimes the new window will pop up from the background.

Pentium 2 @ 233MHz

It's lessened with this build, but the problem still is there.

Ubermonkey, there are a ton of other focus stealing bugs still floating around.
 You are seeing one of these.  Have a look at bug 88810 and its dependencies. 
There you will find places to cast your votes and comments.  This issue is
definitely dead, buried and forgotten.  Trust me on this.
No longer blocks: 114455
Despite the comments about this being "dead and buried", I think it may be back
again... I'm definitely noticing windows popping back into focus after
minimization, and this appears to be happening upon *finishing* loading, as in
this bug, rather than on *starting* loading as in bug 105225.  So we may have a
this is definetly back, i thought maybe bug 126850 would have cured this
problem.  reopening.. I see this in several nightlies.. testing today build
2002-3-6-04 w2k.
Resolution: FIXED → ---
I'll double check maybe its bug 105225.. so Dan if you are not seeing this, I
will re-close this bug.
a) please don't reopen a bug and just say "this" is happening. Be explicit 
   on what you can reproduce.
b) a significant change in focus/z-order was landed yesterday, so if you 
   could re-test in a current build (03/07) that would be good. Update the
   bug with your specific steps to reproduce (or reclose this bug if it isn't
   in today's builds).
Target Milestone: mozilla0.9.7 → Future
I'm sure you were seeing bug 122765.  Reresolving as FIXED.

Please do not reopen without waiting to see if the fix for bug 122765 fixes this.
Closed: 22 years ago22 years ago
Resolution: --- → FIXED
Target Milestone: Future → mozilla0.9.7
yup, that was it, sorry for this mis-normer there jrgm.  I apologize for doing
that, I know better, but it was late so I sometimes forget what it is I'm really
suppose to do and forget details like so, and change things before fully thinking.

Sorry guys.

it was the Z-Order problem.
OK, back to VERIFIED state then..
This has regressed.  Matti, thanks for filing bug 134317 for the regression
rather than reopening this one.
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.