Is isPopupWindow()'s behaviour in konqmainwindow.cpp correct?

David Faure faure at kde.org
Fri Apr 8 00:02:22 BST 2011


On Friday 01 April 2011, Raphael Kubo da Costa wrote:
> Hey there,
> 
> More than once have I clicked in a link that opens a new window by
> calling JavaScript's window.open() and, even though I have set Konqueror
> to always open new windows in tabs, the window is opened separately.
> 
> isPopupWindow() was introduced in konqmainwindow.cpp in git commit
> 87345846 (svn r789501) by harri, but its logic was slightly changed in
> commit da6fcf07 (svn r805892) by dfaure -- it looks like isPopupWindow()
> was previously called when the new window was being opened via MMB/RMB,
> and it is now checked in the opposite situation.

I moved Harri's code when I cleaned up the messy confusion between the two 
boolean settings, now "mmbOpensTab" is about user actions (MMB/RMB), while 
"open popups in new tabs" is about window.open(), this much seems clear and 
wanted.

But what we're seeing here is two opposite wishes:
* you would like window.open() to always always open in a new tab, while
* harri would like window.open() to
 - open a popup window if the javascript specifies a (small) popup window (e.g. 
no menubar, no statusbar, width=, height=), and
 - open a tab otherwise (typicall for full webpages).

However adding a third checkbox sounds completely crazy to me, so I see no 
solution that would make everyone happy.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org).




More information about the kfm-devel mailing list