Open Bug 266330 Opened 20 years ago Updated 13 years ago

Page steals focus from other windows and apps

Categories

(SeaMonkey :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

People

(Reporter: ezh, Unassigned)

References

()

Details

(Whiteboard: [SmBugEvent][Workaround (Linux) see comment #6])

Load the page and during loading open some other window or application - the
mozilla window will steal the focus many times.

PS It crashes also on a regulary base, but I'm unable to send the talkbacks...

moz 2004102405 (and previous builds). Seems that Firefox does not steal the
focus, but flashes the taskbar.
Product: Browser → Seamonkey
Still an issue. I believe bug 279185 is releated to this one. What component
should it be?
Debian's version of Mozilla 1.7.8-1 does this as well.  It not only steals
focus, but unhides and unminimizes itself and raises itself to the top of the
window stack, at least with WindowMaker as window manager.  This is extremely
rude behavior.  The contents of my Mozilla window are not always public in
nature and other people sometimes wander into the room.  If a page is loading,
it's impossible to background Mozilla in a way that keeps it hidden.
Upon further inspection, this appears to be due to the fragment

      // No modifier was pressed, load the URL normally and
      // focus the content area
      loadURI(url);
      content.focus();

in /usr/lib/mozilla/chrome/comm.jar/content/navigator/navigator.js installed,
or mozilla/xpfe/browser/resources/content/navigator.js in the source tree.
This is at around line 1415.  Commenting out the content.focus() seems to cause
Mozilla to not take focus at all when a page load finishes, which is what I
want for my local Mozilla at least.  I'm not sure whether this should be made
a preference option or what.
... but upon yet further inspection, that doesn't seem to work at all.  Hmm.
*peers at the source some more*
Seems WFM in FF3.0.1?
If the bug is still seen in SeaMonkey 2.0.14 or later (preferably 2.1 or later) please speak up and paste the full "Build Identifier" line found at the bottom of the Help → About page (i.e. the UA string).

Workaround for Debian or other Linux versions: if the SeaMonkey browser is on a virtual desktop other than the current one, it won't grab focus but flash its taskbar icon.
Assignee: general → nobody
OS: Windows XP → All
Hardware: x86 → All
Whiteboard: [SmBugEvent][CLOSEME 2011-07-01 WFM][Workaround (Linux) see comment #6]
I see this bug in 2.1  14.00.50727.762 	

Details from about:buildconfig

Build tools
Compiler 	Version 	Compiler flags
d;D:\mozilla-build\msys\mozilla-build\python25\python2.5.exe -O e;D:\mozilla-build\msys\builds\slave\rel-comm-2.0-w32-bld\build\mozilla\build\cl.py cl 	14.00.50727.762 	-TC -nologo -W3 -Gy -Fdgenerated.pdb -DNDEBUG -DTRIMMED -Zi -Zi -UDEBUG -DNDEBUG -O1
d;D:\mozilla-build\msys\mozilla-build\python25\python2.5.exe -O e;D:\mozilla-build\msys\builds\slave\rel-comm-2.0-w32-bld\build\mozilla\build\cl.py cl 	14.00.50727.762 	-GR- -TP -nologo -Zc:wchar_t- -W3 -Gy -Fdgenerated.pdb -wd4800 -DNDEBUG -DTRIMMED -Zi -Zi -UDEBUG -DNDEBUG -O1
(In reply to comment #7)
> I see this bug in 2.1  14.00.50727.762 	
> 
> Details from about:buildconfig
[...]

This isn't what I was asking for, those compiler details and compiler flags are kept more or less unchanged among all SeaMonkey versions. Please do the following (in a SeaMonkey version where the problem is seen, of course):

1. Help → About SeaMonkey
--- The last bullet-item on the page begins with "Build Identifier:".
2. Please use the clipboard to paste the rest (from "Mozilla/5.0" until the end of the about: page) into a comment to this bug.
Whiteboard: [SmBugEvent][CLOSEME 2011-07-01 WFM][Workaround (Linux) see comment #6] → [SmBugEvent][Workaround (Linux) see comment #6]
You need to log in before you can comment on or make changes to this bug.