Focus lost if a link is opened using Ctrl+Enter or Ctrl+Click in a new foreground tab

RESOLVED WORKSFORME

Status

()

Firefox
Tabbed Browser
RESOLVED WORKSFORME
13 years ago
5 years ago

People

(Reporter: Ilja Sekler, Unassigned)

Tracking

(Blocks: 1 bug, {access, helpwanted})

Trunk
access, helpwanted
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060122 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060122 Firefox/1.6a1

If the option "[x] Select new tabs opened from links" is set, opening a link by Ctrl+Click or selecting a link with the keyboard (f.e. "find-as-you-type") and hitting Ctrl+Enter results in the link being loaded in a foreground tab without focus. It is required to press the tabulator key numerous times or to click into the page to be able f.e.to to scroll this page with scroll keys. Middle-Clicking a link works as desired.

FF 1.0.7 and 1.5 on Windows are also affected; the problem doesn't exist on Linux. 

Reproducible: Always

Steps to Reproduce:
1. navigate to a link
2. open the link in a new foreground tab using Ctrl+Enter or Ctrl+Click
3. try to scroll the page using scroll keys or to search content using find-as-you-type

Actual Results:  
The page in the new tab doesn't have focus, scrolling/searching fails until you bring the focus back by clicking into the page or pressing the tabulator numerous times (normally: 4).

Expected Results:  
The page has focus (as it does on Linux).

Bug reproduced also with Windows XP, of course.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060122 Firefox/1.6a1

-Set Options -> Tabs to Select.. etc.
-Went to http://www.nu.nl/
-Tabbed to link
-Hit Ctrl+enter
-And used to arrow key to scroll down

Comment 2

13 years ago
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060120 Firefox/1.6a1

I'm seeing this, too. Could this have regressed from Ben's patch in bug 308396?
OS: Windows 2000 → All
Hardware: PC → All
Summary: focus lost if a link is opened using Ctrl+Enter or Ctrl+Click in a new foreground tab → Focus lost if a link is opened using Ctrl+Enter or Ctrl+Click in a new foreground tab
Version: unspecified → Trunk
(Reporter)

Comment 3

13 years ago
It is a little tricky. I don't see the bug with FF 1.5 on Linux. About Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060122 Firefox/1.6a1: don't release Ctrl key until the page is completely loaded - you can scroll afterwards.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060122 Firefox/1.6a1 
Tried 15 sites and I could only reproduce the problem on this site: http://www.webwereld.nl/ 
Also a single time on these bugzilla pages and only in my default profile.
The problem is also present in a 10 Feb 2004 build, but I could not find it in old Phoenix 4.
(Reporter)

Comment 5

13 years ago
(In reply to comment #4)
> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060122
> Firefox/1.6a1 
> Tried 15 sites and I could only reproduce the problem on this site:
> http://www.webwereld.nl/ 

Strange. Please specify a page where you can't reproduce the problem. I can reproduce it with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060122 Firefox/1.6a1 always, f.e. at http://www.mozilla.com/firefox/central/
Tested with a clean, new profile.

Comment 6

13 years ago
I see this problem too.

It may be useful for the bughunt to mention that keypresses such as up/down arrow (for scrolling) and website-defined keyboard access keys are processed in the tab that is now in the background, i.e. the one that contains the link you used to open the new tab.

(This annoys me very often on Wikipedia when I press Alt+E and the Edit page opens for a different page in a different tab than the current one.)

Comment 7

13 years ago
(In reply to comment #0)
> Actual Results:  
> The page in the new tab doesn't have focus, scrolling/searching fails until you
> bring the focus back by clicking into the page or pressing the tabulator
> numerous times (normally: 4).
> 
> Expected Results:  
> The page has focus (as it does on Linux).
> 
> Bug reproduced also with Windows XP, of course.

I can confirm the behaviour for the following builds:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060122 Firefox/1.5.0.1
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20060123 Firefox/1.5
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060123 Firefox/1.6a1
Easiest test case is the Bugzilla link here in Comment #2. After Ctrl-left-click it opens in a new tab but kyeboard navigation (arrow up/down, page up/down) does not work unless you click right into the page.

Btw, I don't think it's connected to bug 308396 as this has been implemented into the trunk only for the time being.
(In reply to comment #7)
> Easiest test case is the Bugzilla link here in Comment #2.
WFM. In fact I need to search with a candle for sites with the mentioned behaviour. I could find only two of them amongst my bookmarks (tried about 25 sites). This and the fact that no one filed the bug until now although it has existed for so long, indicates that there must be other factors involved, like maybe a keyboard driver? My laptop is using a WinXP driver.

(Reporter)

Comment 9

13 years ago
(In reply to comment #8)
> (In reply to comment #7)
>
>> Easiest test case is the Bugzilla link here in Comment #2.
>
> WFM. [...] This and the fact that no one filed the bug until now although it
> has existed for so long, indicates that there must be other factors involved,
> like maybe a keyboard driver? My laptop is using a WinXP driver.

The bug is 100% reproducible for me on a normal desktop with W2K and on a notebook with WinXP. Using Microsoft IntelliMouse PS/2 on desktop, driver version 4.10.851.0, and a Synaptics Touchpad on notebook, Synaptics driver version 7.2.9.0.

(Reporter)

Comment 10

13 years ago
I apologize for the irrelevant info about mice. Keyboard driver under W2K: kbdclass.sys version 5.00.2195.6666 (Microsoft Natural Keyboard PS/2), keyboard driver under XP: kbdclass.sys version 5.1.2600.2180 (standard keyboard); both from Microsoft.

Comment 11

13 years ago
(In reply to comment #8)
> WFM. In fact I need to search with a candle for sites with the mentioned
> behaviour. I could find only two of them amongst my bookmarks (tried about 25
> sites).

For me it's more than easy to reproduce the bug with each of the builds from comment #7. I just tried www.cnn.com and www.reuters.com. Ctrl-click on the particular headline opens the longtext in a new tab. And in this new tab keyboard navigation (arrow up/down, page up/down) does not work until I manually set the focus into the page.

> This and the fact that no one filed the bug until now although it has
> existed for so long, indicates that there must be other factors involved, like
> maybe a keyboard driver? My laptop is using a WinXP driver.

I'm using a notebook too, with Windows XP SP2. The behaviour persists whatever keyboard I use; the internal notebook keyboard or the 'big' one connected to the notebook's docking station.

Comment 12

13 years ago
(Although I don't see how it's at all relevant that the bug was not reported earlier, I believe three possible reasons for it may be (a) that people generally use the mouse to scroll and navigate, hence few people actually see the bug; (b) apparently it occurs only under Windows, where *even less* people are keyboard fanatics; (c) even the keyboard fanatics probably tended to accept the inconvenient-but-doable workaround of pressing Ctrl+L followed by Tab to re-set focus to the webpage.)

Comment 13

13 years ago
This was fixed for Firefox 1.5, but it was certainly a problem before that.

Can more than one person duplicate this on 1.5/Win?

Updated

13 years ago
Keywords: access, helpwanted
I can confirm this on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1.

I tested ctrl-clicking and ctrl-entering several article links on cnn.com.  The newly opened document has no focus; scrolling fails.  I similarly tested several links on diveintomark.org -- same results, no focus, scrolling fails.  I also tested several links on intertwingly.net (served as application/xhtml+xml), with identical results.

Trying to rule out some variables...

* Virtually every link on cnn.com tries (and fails) to open a popup window, but my site doesn't use them (nor do any of the linked sites).  The "Firefox blocked a popup" box does not appear to be the culprit.
* Virtually every link on cnn.com goes to another page on the same domain, but my site links to several external sites.  The domain of the target doesn't appear to matter.
* Links on cnn.com that do go to other domains are marked up with target="new" (or occasionally target="_blank").  Obviously ctrl-clicking overrides this.  Links on my site have no target attribute, but behave identically.  So the target attribute doesn't appear to matter.
* cnn.com uses junk markup everywhere; my sites use valid HTML.  Validity doesn't appear to matter.
* I can reproduce the bug on intertwingly.net, which is served as application/xhtml+xml.  Content-type (and therefore parsing mode, etc.) doesn't appear to matter.
Also confirmed on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060207 Firefox/1.6a1
(Reporter)

Comment 16

12 years ago
It looks as if some of the changes in the system configuration made by the security script from http://ntsvcfg.de/ntsvcfg_eng.html cause the reproducibility of this bug. Restoring the default system configuration has made Firefox to behave as described in comment #4 and in comment #8.

Updated

12 years ago
Assignee: nobody → mats.palmgren
*** Bug 320090 has been marked as a duplicate of this bug. ***

Updated

12 years ago
Blocks: 83552

Comment 18

12 years ago
Perhaps the same bug as Bug 151073?

Build identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1b1) Gecko/2006081618 BonEcho/2.0b1

Another way to trigger this bug is to *not* have 'When I open a link in a new tab, switch to it immediately' selected and open a link in a new tab and switch to it manually right away.

Cmd-click the following link to open in a new tab
http://agadak.net/10sec.php <-- will take a few seconds to load
Switch to the tab with ctrl-tab or the appropriate cmd-#.

It seems that focusing on the tab before there is any content to flow/display will cause this issue to happen.

Note: 2 finger scrolling as well as mousewheel scrolling still works on the opened tab. Even after scrolling up/down/left/right with the mouse, keyboard scrolling doesn't work.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 19

12 years ago
This bug has been in every Windows version that I have installed except 1.7.2

Comment 20

12 years ago
I'm not sure if this is a related bug or not, but it has similar results:

Press Ctrl-T to open a new tab.
Press Ctrl-W to close the new tab.  This should work, but nothing happens.  Clicking anywhere in the window will give the new tab focus, and Ctrl-W will work.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1b1) Gecko/20060710 Firefox/2.0b1

Comment 21

12 years ago
The patch for bug 305939 should resolve this if it lands.
The steps to reproduce are different in these two bugs but the underlying problem is the same.
Depends on: 305939

Comment 22

11 years ago
fixed?  (should be)

Updated

7 years ago
Assignee: matspal → nobody
I'm unable to reproduce this bug in Nightly 21.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.