Bug 171029 - Konqueror opens a new, empty tab in some cases
Summary: Konqueror opens a new, empty tab in some cases
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: SVN
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 172923 259361 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-09-14 11:48 UTC by András Manţia
Modified: 2012-06-18 19:32 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description András Manţia 2008-09-14 11:48:20 UTC
In some cases when clicking on an image, pdf or a javascript that pops up a window, a new, empty tab is opened as well. Here is an examples:
http://alpinet.org/main/foto/top_ro_t_topul-foto_item_1_what_list.html
click on any picture, you will see a new window witht he picture and an empty tab near of it.

I will add some examples as I run into them.
Comment 1 Maksim Orlovich 2008-09-14 16:20:36 UTC
Please let me know if you can find a way to reproduce it. I suspect I know what it is (double-click events getting propagated up to the tabwidget) but I would like a way of testing before making the change.
Comment 2 David Faure 2008-09-15 17:41:21 UTC
Fixed in r861259.
Comment 3 András Manţia 2008-10-10 11:29:39 UTC
Let's reopen it as I can give an example for the "pdf" part:

http://www.insse.ro/cms/rw/pages/comunicate/arhivasomaj.en.do

click on any link that contains a pdf. A new tab "Loading" will appear and a dialog asks you to open the file in okular or save it. Whatever you chose, the Loading tab will stay there until you close it.
Comment 4 David Faure 2008-10-10 12:08:57 UTC
Can't fix. If we don't open the tab immediately, konqueror appears unresponsive (been there, tried that, see Bug 163628). So we have to open the tab immediately, even if we (in rare cases) are not going to use it because we are firing another application instead.
There is no choice there. Try it in Firefox, it does exactly the same: you get a "Loading" tab, that ends up being unused.
And cleaning up the unused tab automatically would lead to unexpected jumping behavior, confusing users when they are about to close the tab or type a new url or switch tabs etc.
Comment 5 András Manţia 2008-10-10 12:25:07 UTC
Firefox indeed opens the new tab, but closes as soon as the dialog to choose the application that opens the file appears.
Comment 6 David Faure 2008-10-10 12:34:50 UTC
OK, I guess that doing it when popping up the dialog (just before, or even better, just after) is a way to avoid the race where the user would be clicking on the "close tab" button just after we delete the tab (and therefore closing another unrelated tab).

This seems like a good solution. Reopening (but no time for this right now).
Comment 7 Maksim Orlovich 2008-10-16 19:05:50 UTC
*** Bug 172923 has been marked as a duplicate of this bug. ***
Comment 8 Dawit Alemayehu 2011-09-07 06:29:56 UTC
Git commit ccf74eaa8c9ab1807848272e065562414ff278c5 by Dawit Alemayehu.
Committed on 07/09/2011 at 08:15.
Pushed by adawit into branch 'master'.

Automatically close empty new windows created through a JS call
whenever the request is handled by external application.

CCBUG: 171029

M  +4    -0    src/webpage.cpp

http://commits.kde.org/kwebkitpart/ccf74eaa8c9ab1807848272e065562414ff278c5
Comment 9 Dawit Alemayehu 2011-09-07 06:31:32 UTC
Git commit fcaac497dc1282f6f019c120b06659a72f8a543b by Dawit Alemayehu.
Committed on 07/09/2011 at 08:15.
Pushed by adawit into branch '1.2'.

Automatically close empty new windows created through a JS call
whenever the request is handled by external application.

CCBUG: 171029

M  +4    -0    src/webpage.cpp

http://commits.kde.org/kwebkitpart/fcaac497dc1282f6f019c120b06659a72f8a543b
Comment 10 Dawit Alemayehu 2011-09-07 06:32:30 UTC
Git commit 06892ce6e5bb920e9b586f60f7ace2da745ef2cd by Dawit Alemayehu.
Committed on 07/09/2011 at 08:15.
Pushed by adawit into branch 'master'.

Automatically close empty new windows created through a JS call
whenever the request is handled by external application.

CCBUG: 171029

(cherry picked from commit fcaac497dc1282f6f019c120b06659a72f8a543b)

M  +4    -0    src/webpage.cpp

http://commits.kde.org/kwebkitpart/06892ce6e5bb920e9b586f60f7ace2da745ef2cd
Comment 11 Dawit Alemayehu 2011-10-21 06:07:44 UTC
*** Bug 259361 has been marked as a duplicate of this bug. ***
Comment 12 Janek Bevendorff 2012-06-18 19:32:05 UTC
Assuming this is fixed due to comments #8, #9 and #10.
If the issue still exists in Konqueror 4.8.4 or later, please reopen.