After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 151943 - "focus stealing prevention" for page loads
"focus stealing prevention" for page loads
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Interface
unspecified
Other Linux
: Normal normal
: Future
Assigned To: Epiphany Maintainers
Marco Pesenti Gritti
: 312862 611526 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-09-06 01:37 UTC by Havoc Pennington
Modified: 2012-03-02 16:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Havoc Pennington 2004-09-06 01:37:24 UTC
We've been working on timestamp-based "focus stealing prevention" in metacity,
so if you launch a new window, then start doing something else, the new window
will not get focus.

Sometimes I start a page load, start doing something else, and then the
newly-loaded page grabs focus. A common case is when opening a new browser
window, the home page starts to load; my home page has an entry box on it, so
grabs focus from the URI I'm typing.

So the suggestion is that when starting a page load, record the X timestamp.
If _NET_WM_USER_TIME is updated before the page finishes loading, don't 
move the focus to the page. Not sure if GDK exports good API for keeping track
of this.
Comment 1 Christian Persch 2004-10-13 10:55:52 UTC
Mass reassigning of Epiphany bugs to epiphany-maint@b.g.o
Comment 2 lsof 2004-11-19 11:44:34 UTC
> We've been working on timestamp-based "focus stealing prevention" in metacity
> so if you launch a new window, then start doing something else, the new
> window will not get focus.

How does timestamping prevent stealing focus?
Surely the focus will still be stolen, just a bit later?
Comment 3 Havoc Pennington 2004-11-19 18:15:27 UTC
compare the timestamp when the page load was initiated with the timestamp of the
last user action; if the user has started doing something since the page load
initiated, don't grab focus from what they are doing.
Comment 4 Christian Persch 2005-01-30 23:10:48 UTC
Is this bug talking about the same thing as bug 150085 ?
Comment 5 Havoc Pennington 2005-01-31 15:44:59 UTC
No, 150085 is focus of the epiphany window vs. other windows, this bug is about
focus *within* the browser itself. There are various times the browser will jump
focus somewhere within the web page when you're trying to type elsewhere.
Comment 6 lexual 2005-02-14 02:33:21 UTC
I'd just like to confirm this bug. Epiphany's focus seems to jump around quite a
bit. Initially it just seems like an annoying bug but I think it can be seen as
something of a security risk.

e.g.
You are halfway through entering a password for a site, when the focus is taken
the 2nd half of your password is visible because you have continued to type but
the focus has been given elsewhere.
Comment 7 Bastien Nocera 2005-03-15 16:12:36 UTC
Isn't this a dupe of bug 105153 ?
Comment 8 Christian Persch 2005-03-16 11:33:06 UTC
Right.

Galeon has some work-around for the focus bugs; I'm contemplating copying them.

*** This bug has been marked as a duplicate of 105153 ***
Comment 9 lexual 2005-03-16 22:16:28 UTC
Is this really a duplicate of 105153???
105153 seems to be about the location bar not getting focus when you create a
new tab. 
This bug is about focus jumping around when the user doesn't wish it.
Comment 10 Havoc Pennington 2005-03-16 22:28:19 UTC
I don't think it's a dup personally. Maybe I haven't made it clear enough what
this bug is about?
Comment 11 Martin Wehner 2005-08-08 23:04:15 UTC
*** Bug 312862 has been marked as a duplicate of this bug. ***
Comment 12 Reinout van Schouwen 2005-08-10 14:39:30 UTC
Havoc, can you try again with ephy 1.7.4?
Comment 13 Christian Persch 2005-08-10 15:09:27 UTC
While the most serious focus bug is fixed in 1.7.5 (1.7.4 has an unfortunate
configure bug that prevents it from being enabled, ahem), this still looks like
a good idea to solve the problem of where to put the focus when loading a new
page in the active tab.
Comment 14 Mjumbe Wawatu Ukweli 2010-05-23 20:31:14 UTC
Was there progress on this?  It appears to not have been resolved as of Epiphany 2.29.91 (Bug 611526).
Comment 15 Mjumbe Wawatu Ukweli 2010-05-23 20:36:18 UTC
*** Bug 611526 has been marked as a duplicate of this bug. ***
Comment 16 Ole Laursen 2010-05-27 19:07:20 UTC
Apart from occasional crashes (might be from plugins), this is and was the most annoying bug in Epiphany. :) I think it was fixed when Epiphany was using the Gecko backend. I didn't see it for some years. 

But now with the Webkit backend, it's back. I saw it two minutes ago, on 2.30.2.

I remember when I used the new Webkit backend for the first time, experiencing the bug again: this is Epiphany! It actually got me a bit excited, still the same good ol' browser in spite of the change underneath.
Comment 17 Luca Bruno 2011-02-15 11:23:53 UTC
(In reply to comment #16)
> Apart from occasional crashes (might be from plugins)

Yes epiphany 2.30 crashes with the flash plugin, and it's not a flash plugin bug because the same plugin works with other browsers.

> But now with the Webkit backend, it's back. I saw it two minutes ago, on
> 2.30.2.
> 
> I remember when I used the new Webkit backend for the first time, experiencing
> the bug again: this is Epiphany! It actually got me a bit excited, still the
> same good ol' browser in spite of the change underneath.

I used epiphany/webkit for a long while and never had such a bug.
Now I'm experiencing this bug with epiphany 2.91/gtk3.
Comment 18 Diego Escalante Urrelo (not reading bugmail) 2012-03-02 16:40:07 UTC
This should work fine in master with recent webkitgtk.
Please reopen if you still see this in epiphany master + webkitgtk 1.7.9x