Open Bug 53948 Opened 24 years ago Updated 2 years ago

http-equiv refresh grabs keyboard focus

Categories

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

x86
Linux
defect

Tracking

()

Future

People

(Reporter: matt, Unassigned)

References

()

Details

Attachments

(1 file)

Linux build 20000922, Linux 2.2.14 i686, RedHat 6.1 If you have multiple Mozilla window open, and one of them has a http-equiv refresh set via a META tag, then that window grabs the keyboard focus, even if it's in the background. To reproduce: 1) Go to AltaVista and do a search. 2) Open another window. 3) Load something in the second window, and make sure that it has keyboard focus by scrolling up and down with the arrow keys. 4) Wait until the AltaVista page refreshes (this should take about 5 minutes). Make sure that you leave the second window in the foreground, and with the keyboard focus. 5) Try scrolling the second window. It should still have the keyboard focus, but the first window displaying AltaVista will scroll instead.
Confirmed 092508 trunk mozilla build. over to event handling
Assignee: asa → joki
Component: Browser-General → Event Handling
QA Contact: doronr → janc
This is related, if not duplicate, of the bug where the app hangs if you have a modal dialog open and get a http-refresh in the content window. I don't remember the bug number and I can't seem to find it... Anyway, this is not so serious, which is why: This bug has been marked "future" because the original netscape engineer working on this is over-burdened. If you feel this is an error, that you or another known resource will be working on this bug,or if it blocks your work in some way -- please attach your concern to the bug for reconsideration.
Target Milestone: --- → Future
Similarly (not sure if this is the same) in M18/Linux/Gnome a page the completes loading will grab the focus from the page being used, to the extent that the new page displays over the page being read. However, the window manager (Gnome in this case) doesn't think that the focus has changed, and hitting alt tab goes to the wrong page.
not mine, passing on to vladimire
QA Contact: janc → vladimire
see related bug 66900
Blocks: 140346
It's not just scrolling that stops working. The most annoying manifestation of this bug is when using a webmail program like The IMP (horde.org/imp). The message list refreshes as often as it's told to, which is probably more less time than it takes to compose a message in another tab. I'm using Debian/GNU (unstable) and Galeon, but I'm fairly certain this is a Gecko issue. -- Robert de Forest <robert-bugzilla@thatsnice.org>
.
Assignee: joki → saari
QA Contact: vladimire → ian
I see something similar with http://games.yahoo.com/games/gen/cwpuz/puz_030924.html. While playing the crossword puzzle in java, if a page reloads in another tab, the focus will shift away from the java and to the browser. This really kills you if you hit the backspace. End of puzzle. :-| Is this the right bug or is there another I should mention this in?
It is not only with http-equiv refresh. If you use javascript to continuously focus a textarea or related, then the caret also disappears on other windows.
I've seen this bug is unassingned. Is anyone working on this bug? I think the focus method should be removed or have a dummy focus for compatibility. It may be added to javascript permissions to let people choose.
Is this still an issue in current trunk build?
*** Bug 317443 has been marked as a duplicate of this bug. ***
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20051121 Firefox/1.6a1 ID:2005112103 Don't know if this is quite the same, but when I load http://www.nu.nl/ in one window (has an auto-refresh) and https://bugzilla.mozilla.org/show_bug.cgi?id=53948 in another window with the cursor in the Additional Comments box, it still has the focus after 10 minutes. The same with tabs instead of windows. So at least I can't reproduce Bug 317443.
(In reply to comment #13) > Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20051121 > Firefox/1.6a1 ID:2005112103 ... > So at least I can't reproduce Bug 317443. I notice that you are using 1.6a1, and I'm using 1.5 RC3. Would that account for the difference? I have seen this happen on two different computers, one running Windows XP and the other Windows 2000. I've had another person tell me about this problem on a third computer. It is 100% reproduceable here. I'm not sure this bug is the same as 53948. The previous descriptions talk about the focus being taken away. In my experience, the focus is simply turned off. It is not grabbed by anything else. Pressing the tab key moves to the next element on the same page.
(In reply to comment #14) Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051119 Firefox/1.5 ID:2005111903 Not reproducible with the testcase of comment #13.
This also happens on 1.5.0.1 on windows. Having e.g. Nagios in one tab (refreshes via meta-refresh every minute) makes it nearly impossible to post to a forum or use some webmail like gmail, as any textbox you're writing in loses its focus as soon as the Nagios page in the other tab refreshes. And when that happens, backspace surely can ruin your day...
This bug is alive and well in 2.0. One additional piece of information is that the problem I observe doesn't happen with all refreshed web pages. The refreshed page must also have javascript in it. I don't know if this related, but the page that causes focus problems for me has the following lines. <BODY BGCOLOR="#ffffff" ONLOAD=" var tmp = (document.getElementsByName('focus')); if (tmp.length > 0) tmp[tmp.length-1].focus(); " >
Assignee: saari → nobody
QA Contact: ian → events
This seems to be fixed. Can anyone confirm this ?
The web site I found the bug on in 2003 (!!) no longer exists, and I am no longer able to reproduce.
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

Created:
Updated:
Size: