Bug 39771 - "Smart" window open policy bogus
Summary: "Smart" window open policy bogus
Status: RESOLVED NOT A BUG
Alias: None
Product: konqueror
Classification: Applications
Component: kjs (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-25 16:33 UTC by ck
Modified: 2002-11-04 14:02 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ck 2002-03-25 16:23:17 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           kjs
Version:           KDE 3.0.0 CVS/CVSup/Snapshot
Severity:          normal
Installed from:    Compiled sources
Compiler:          gcc-2.96
OS:                Linux
OS/Compiler notes: Not Specified

Judging from the code in khtml/ecma/kjs_window.cpp attempts to open a window via javascript are ignored if they are not result of a click/keypress action. I have a case where the use does indeed click a button but the application goes through some code before attempting to open that additional window. In this case the window is *not* opened if I choose the "smart" policy in Konqueror settings. 
Not sure if this is a feature request or a bug (or what feature to request here :-(


(Submitted via bugs.kde.org)
Comment 1 George Staikos 2002-03-25 17:33:40 UTC
On Monday 25 March 2002 11:23 ck@heise.de wrote:
> Judging from the code in khtml/ecma/kjs_window.cpp attempts to open a
> window via javascript are ignored if they are not result of a
> click/keypress action. I have a case where the use does indeed click a
> button but the application goes through some code before attempting to
> open that additional window. In this case the window is *not* opened if I
> choose the "smart" policy in Konqueror settings. Not sure if this is a
> feature request or a bug (or what feature to request here :-(

   Yes thus Smart policy is new and still in its infancy I think.  There are 
lots of ways for it not to work and there is supposed to be a faq at 
sometime about it.  For instance window.open() which does a window.open will 
not work since the second one is not interactive.  Thanks for the report and 
over time hopefully we can develop this one a bit more.

-- 

George Staikos
Comment 2 David Faure 2002-03-26 21:59:32 UTC
> I have a case where the use does indeed click a button but the 
> application goes through some code before attempting to open that 
> additional window. 

Can you submit a testcase which shows this? Thanks.

-- 
David FAURE david@mandrakesoft.com faure@kde.org
http://people.mandrakesoft.com/~david http://www.konqueror.org
KDE 3.0: Konquering the Desktops
Comment 3 ck 2002-03-27 08:23:02 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Dienstag 26. März 2002 22:59 schrieb David Faure:
> > I have a case where the use does indeed click a button but the
> > application goes through some code before attempting to open that
> > additional window.
>
> Can you submit a testcase which shows this? Thanks.

Not easily. The problem happens with a perl script which is a bit too big to 
submit. This is going on:
- - The user clicks on a <input type=button>-Element. 
- - This triggers a Javascript function which in turn calls the *same* Perl 
script again by setting the location property of the window object adding a 
CGI parameter
- - In its second execution the Perl script uses this parameter to trigger a JS 
function (using "onload") which then *should* open the window. If "clever" 
mode is selected in Konqueror settings it does not do this.

Yes this is somewhat contrived. And I would not say that it's actually a bug 
in KJS - the question is simply what "clever" mode should do. Or if it would 
be more sensible to implement JS open window policies depending on the server 
address like for the overall JS policies.

Kind regards
- -- 
Christian Kirsch
ck@ix.heise.de
Tel +49-30-78702288   +49-511-5352-590
Fax +49-30-78702289   KEINE ANNAHME VON DOC-DATEIEN
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8oYFqYamCtkVm7roRAtEZAJ0SYXQn/yWvTnm80vflVDhOVcYjCQCfYgXY
DZUxVBLzwQb8oOKR/e1sPzY=
=R4rb
-----END PGP SIGNATURE-----
Comment 4 David Faure 2002-08-09 14:44:22 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 25 March 2002 17:23 ck@heise.de wrote:
> Package: kjs
> Version: KDE 3.0.0 CVS/CVSup/Snapshot
> Severity: normal
> Installed from:    Compiled sources
> Compiler:          gcc-2.96
> OS:                Linux
> OS/Compiler notes: Not Specified
> 
> Judging from the code in khtml/ecma/kjs_window.cpp attempts to open a window via javascript are ignored if they are not result of a click/keypress action. I have a case where the use does indeed click a button but the application goes through some code before attempting to open that additional window.
> In this case the window is *not* opened if I choose the "smart" policy in Konqueror settings. 
> Not sure if this is a feature request or a bug (or what feature to request here :-(

I don't know either but a testcase would help ;)

- -- 
David FAURE david@mandrakesoft.com faure@kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/ http://www.koffice.org/
Back from holidays
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9U9VG72KcVAmwbhARAvMHAJ9pNuxDePUNRjsxPVHNUdb7RwA//ACeIrx0
Jca7rJdNHhGJr5cr2L3Cox0=
=QJuS
-----END PGP SIGNATURE-----
Comment 5 David Faure 2002-11-04 14:02:34 UTC
Nothing we can do about such a case in the smart policy. The site is just being smarter :) 
 
Per-domain window.open policies are being implemented for after 3.1 - see bug 49145 and 
kfm-devel discussions.