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

Dawit A adawit at kde.org
Fri Apr 8 16:02:19 BST 2011


On Fri, Apr 8, 2011 at 9:59 AM, Raphael Kubo da Costa <kubito at gmail.com> wrote:
> Dawit A <adawit at kde.org> writes:
>
>> That is not true. If a window.open request contains any "features" as
>> shown below, then it MUST always be opened as a new window regardless
>> of the user's preference.
>>
>> window.open ("http://www.kde.org", "new_window", "width=200, height=100");
>>
>> Otherwise, things like web calender widgets would not work as
>> intended. Oh and those features in the third parameter do not have to
>> be width and height information either. You can try the above script
>> in both Firefox and Opera, or any other browser for that matter, and
>> you will see it opens up in a new window.
>
> This is the specific function in a website that prompted me to write
> about this matter:
>
>  function OpenURL(TheURL) {
>        var largura = screen.availWidth;
>        var altura = screen.availHeight;
>        window.open(TheURL,"URL","top=0, left=0, width="+ (largura-7) +
>                    ", height="+ (altura-7) + ",
>                    scrollbars=yes,toolbar=no,location=no,menubar=no,resizable=yes");
>  }
>
> Indeed, Firefox4 opened this in a new window, whereas Opera did open it
> in a new tab.
>
> This seems to be a limit case where the new window is created via
> window.open, but was expected to behave like a full-screen window ;)

Then Opera is the outlier in this case. I can tell you that Firefox,
Chrome and IE behave exactly like KDE browsers do and open in a new
window so long as the 3rd features parameter is specified. It should
also be very obvious that what Opera does is simply wrong in this case
because it cannot possibly fulfill the intent of the javascript
function above if it opens the new window as another tab.




More information about the kfm-devel mailing list