Bug 309649

Summary: WebKit does not honour "Open links in new tab instead of new window", KHTML ok
Product: [Applications] konqueror Reporter: Jonathan Marten <jjm>
Component: generalAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: adawit
Priority: NOR    
Version: Git   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
URL: http://api.kde.org/
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jonathan Marten 2012-11-06 13:16:19 UTC
Settings - Configure Konqueror - General has the option "Open links in new tab instead of in new window".  If this option is turned on, a new-window link does indeed open in a new tab if the rendering engine is set to KHTML.  If it is set to WebKit then the option seems to be ignored and a new window is opened.


Reproducible: Always

Steps to Reproduce:
1.  Go to http://api.kde.org in Konqueror.
2.  Set the option as above on (checked).
3.  From the menu bar select View - View Mode - KHTML
4.  Hover over the "Qt4" link in the first paragraph.  The status bar will show "http://qt-project.org/doc/latest (in new window)".
5.  Click the link with the left button.  A new tab will be opened.
6.  From the menu bar select View - View Mode - WebKit
7.  Click the link again.  A new window will be opened.

Actual Results:  
In step 7 above, a new window is opened when a new tab should be.


Expected Results:  
The link should open in a new tab, regardless of the rendering engine setting.


Clicking the link with the middle button, or using "open in new tab" from the popup menu, correctly opens a new tab regardless of the view mode.
Comment 1 Jonathan Marten 2012-11-07 12:57:47 UTC
Review requested at https://git.reviewboard.kde.org/r/107238/
Comment 2 Dawit Alemayehu 2012-11-07 14:35:07 UTC
I cannot reproduce this. When I click on the link you mentioned in step #4, the link opens in a new tab for me. What is  your default browser engine set to in Konqueror's configuration dialog ?
Comment 3 Jonathan Marten 2012-11-07 15:11:09 UTC
Step 4 should be OK - a new tab opens in KHTML.
The problem is step 7 - in WebKit a new window opens where a new tab would be expected.

Default browser engine is set to WebKit.  Any new browser windows correctly open in WebKit.

View - View Mode menu lists WebKit, KHTML, Embedded Advanced Text Editor in that order.  WebKit is ticked.
Comment 4 Dawit Alemayehu 2012-11-07 16:53:13 UTC
(In reply to comment #3)
> Step 4 should be OK - a new tab opens in KHTML.
> The problem is step 7 - in WebKit a new window opens where a new tab would
> be expected.

I was talking about the link in that step, not the step itself. I did the test with the webkit engine since that is what I use personally.
Comment 5 Dawit Alemayehu 2012-11-08 17:10:13 UTC
Ahh... I see the problem now. You are using the default Konqueror settings and I have the "Open popups in a new tab instead of in new window" option checked. That was why I was not able to reproduce this issue. I guess to KHTML defines popups as those windows created as a result of a javascript based action.
Comment 6 Jonathan Marten 2012-11-20 11:58:52 UTC
Git commit fe6c0f09de0cb550aafa9b2ad0c3d973a0e5a892 by Jonathan Marten.
Committed on 20/11/2012 at 12:56.
Pushed by marten into branch 'master'.

Honour Konqueror's "Open links in new tab
instead of in new window" option.
REVIEW:107238

M  +2    -2    src/webpage.cpp

http://commits.kde.org/kwebkitpart/fe6c0f09de0cb550aafa9b2ad0c3d973a0e5a892