Bug 304865 - Opening links in new tab sometimes puts focus on location bar
Summary: Opening links in new tab sometimes puts focus on location bar
Status: RESOLVED MOVED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 4.9.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-09 16:24 UTC by Graeme Hewson
Modified: 2013-10-19 15:48 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.9.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Graeme Hewson 2012-08-09 16:24:21 UTC
I have Konqueror configured to open links in a new tab instead of a new window. Sometimes (very roughly I would guess one time in 100) when I press Page Down when at the top of the new tab, Konqueror goes to the page which is second in the history list instead of paging down. This seems to be because the focus is on the location bar instead of the page; I have also seen a space inserted in the bar when I've pressed space to page down.

I'm using 4.8.5, but this version isn't in the list in the bug form. I've encountered the problem in several earlier versions, though.

Reproducible: Sometimes




I have Konqueror configured to open links in a new tab instead of a new window. Sometimes (very roughly I would guess one time in 100) when I press Page Down when at the top of the new tab, Konqueror goes to the page which is second in the history list instead of paging down. This seems to be because the focus is on the location bar instead of the page; I have also seen a space inserted in the bar when I've pressed space to page down. If I reload the page I want, then Page Down works as expected.

I'm using 4.8.5, but this version isn't in the list in the bug form. I've encountered the problem in several earlier versions, though.

This is similar to bug 208821.
Comment 1 Graeme Hewson 2012-08-10 17:26:06 UTC
I don't know if this is related to bug 304933, where the problem always occurs if the "Open new tabs in the background" setting is off.

The problem could be ameliorated if Page Down with focus in the location bar were ignored (bug 171612).
Comment 2 Dawit Alemayehu 2012-08-11 15:37:01 UTC
Are you sure you are not instead pressing SHIFT before using the MMB to click on the link ? Doing SHIFT + MMB causes the new tab to be activated instead of opened in the background (which is the default case) and hence result in the confirmed bug reported in bug# 304933. If you are sure you are not pressing the SHIFT key, then the issue is something else that is not readily reproducible.
Comment 3 Graeme Hewson 2012-08-11 16:01:58 UTC
Yes, I'm sure (which is why I opened two bug reports). Indeed, it's not readily reproducible.
Comment 4 Graeme Hewson 2012-08-22 09:35:49 UTC
OK, I can reproduce it now.

1. Set window behaviour policy to Focus Follows Mouse.

2. Have Konqueror (with KHTML) on the desktop and some other application (e.g., Konsole).

3. Go to https://en.wikipedia.org and enter some article title (e.g., KDE) in the search box. Enter the text manually (don't use the menu items that Wikipedia presents) and press Enter on the keyboard.

4. Notice that no area has focus (pressing Space has no effect).

5. Move the mouse cursor out of Konqueror and into the other application.

6. Move the mouse cursor back to Konqueror. Notice that focus is now in the location bar, so pressing Space inserts a space before the URL, or Page Down goes to the top of the history list.

Currently using 4.9.00.
Comment 5 Dawit Alemayehu 2012-08-26 23:45:34 UTC
Git commit 55c0f6baf97a07d1ee03a6a0523f9d4ea3ad40a3 by Dawit Alemayehu.
Committed on 27/08/2012 at 01:40.
Pushed by adawit into branch 'KDE/4.9'.

Fix for the issue where the focus goes to the location bar when opening a link
in new foreground tab.
Related: bug 304933
FIXED-IN: 4.9.1
REVIEW: 105984

M  +2    -1    konqueror/src/konqframe.cpp
M  +9    -0    konqueror/src/konqview.cpp

http://commits.kde.org/kde-baseapps/55c0f6baf97a07d1ee03a6a0523f9d4ea3ad40a3
Comment 6 Dawit Alemayehu 2012-08-27 06:29:28 UTC
Git commit a2ae8003352442efdb5731b3fd3de3107b0c1e99 by Dawit Alemayehu.
Committed on 27/08/2012 at 01:40.
Pushed by adawit into branch 'master'.

Fix for the issue where the focus goes to the location bar when opening a link
in new foreground tab.
Related: bug 304933
FIXED-IN: 4.9.1
REVIEW: 105984

M  +2    -1    konqueror/src/konqframe.cpp
M  +9    -0    konqueror/src/konqview.cpp

http://commits.kde.org/kde-baseapps/a2ae8003352442efdb5731b3fd3de3107b0c1e99
Comment 7 Graeme Hewson 2012-09-16 11:28:16 UTC
I've installed the Kubuntu PPA for 4.9.1, but the problem is still present: I can reproduce it as detailed above.
Comment 8 Dawit Alemayehu 2012-09-16 13:27:19 UTC
(In reply to comment #7)
> I've installed the Kubuntu PPA for 4.9.1, but the problem is still present:
> I can reproduce it as detailed above.

Yes, the fix I committed had a flaw (regression) that was subsequently addressed addressed in a later commit [1]. Unfortunately that commit did not make the 4.9.1 cut. It will however be in v4.9.2. I've updated the "Version Fixed In:" field accordingly.

[1] https://projects.kde.org/projects/kde/kde-kaseapps/repository/revisions/5fa3dbc49f8cac8253e198298948832ca7d38674
Comment 9 Graeme Hewson 2012-10-15 16:29:56 UTC
The bug is still present in 4.9.2: I can reproduce it as detailed above. This is both with the Kubuntu PPA under Kubuntu 12.04 and with a clean install of Kubuntu 12.10 Beta 2 with recent updates. Kubuntu 12.10 Beta 2 has KDE 4.9.1 when installed, and the updates take it up to 4.9.2.
Comment 10 Dawit Alemayehu 2012-10-15 18:24:15 UTC
Now everyting is getting conflated here. You did not specify that you were using "Focus Follows Mouse" policy on the original report. You specified that in comment #4 ; so the question remains can you can reproduce the problem when the "Focus Follows Mouse" window policy is not set ? I do not use that policy and the fix as well as the subsquent testing I did was done without that window policy being set. There are other things that need to be considered if the issue only occurs when that policy is set.
Comment 11 Graeme Hewson 2012-10-15 19:16:42 UTC
Until comment 4 the problem seemed to me to be intermittent. Can you suggest a checklist of information people should include when reporting apparently intermittent problems?

In comment 4 I gave details of how to reproduce the problem, including as Step 1 the setting of the focus policy.

In answer to your question: yes, I can reproduce the problem using Click to Focus. Here are the steps to do so:

1. Set window behaviour policy to Click to Focus.

2. Have Konqueror (with KHTML) on the desktop and some other application (e.g., Konsole).

3. Go to https://en.wikipedia.org and enter some article title (e.g., KDE) in the search box. Enter the text manually (don't use the menu items that Wikipedia presents) and press Enter on the keyboard.

4. Notice that no area has focus (pressing Space has no effect).

5. Click the mouse in the other application to give it focus.

6. Click the mouse on the Konqueror window title. Notice that focus is now in the location bar, so pressing Space inserts a space before the URL, or Page Down goes to the top of the history list.
Comment 12 Dawit Alemayehu 2012-10-15 21:12:26 UTC
(In reply to comment #11)
> Until comment 4 the problem seemed to me to be intermittent. Can you suggest
> a checklist of information people should include when reporting apparently
> intermittent problems?

Well, you marked it correctly by saying "Reproducible: Sometimes". That is the only means a user has to report such issues. We do not have a specific checklist you can use, but including as much information about your setup so as to help the developers reproduce the problem goes a long way into getting bugs fixed much more quickly.

> In comment 4 I gave details of how to reproduce the problem, including as
> Step 1 the setting of the focus policy.
> 
> In answer to your question: yes, I can reproduce the problem using Click to
> Focus. Here are the steps to do so:
> 
> 1. Set window behaviour policy to Click to Focus.
> 
> 2. Have Konqueror (with KHTML) on the desktop and some other application
> (e.g., Konsole).
> 
> 3. Go to https://en.wikipedia.org and enter some article title (e.g., KDE)
> in the search box. Enter the text manually (don't use the menu items that
> Wikipedia presents) and press Enter on the keyboard.
> 
> 4. Notice that no area has focus (pressing Space has no effect).
> 
> 5. Click the mouse in the other application to give it focus.
> 
> 6. Click the mouse on the Konqueror window title. Notice that focus is now
> in the location bar, so pressing Space inserts a space before the URL, or
> Page Down goes to the top of the history list.

OK. I see why I cannot reproduce this problem. The issue can only be reproduced with the KHTML engine and I use the webkit engine. Though I doubt it, I will try to determine if Konqueror is responsible for this bug. It is highly likely the issue is in khtml itself, but we shall see...
Comment 13 Dawit Alemayehu 2012-10-19 23:09:25 UTC
This is a khtml issue as far as I can tell.
Comment 14 Graeme Hewson 2013-10-19 15:48:30 UTC
Opened bug 326267 instead; closing this bug.