Bug 102044

Summary: window.open with target=_self is blocked by Smart popup prevention
Product: [Applications] konqueror Reporter: estevam
Component: khtml ecmaAssignee: Konqueror Developers <konq-bugs>
Severity: wishlist    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description estevam 2005-03-21 04:14:06 UTC
Version:           3.4.0 (using KDE 3.4.0 Level "a" , SUSE 9.2 UNSUPPORTED)
Compiler:          gcc version 3.3.4 (pre 3.3.5 20040809)
OS:                Linux (i686) release 2.6.8-24.11-default

Konqueror doesn't auto-redurect this site: http://preco.buscape.com.br/myredirect_livro.asp?id=3482&emp_id=171&id_livro=0&pos=1&isbn=8533603282&or=1000

The javascript code:
Comment 1 Thiago Macieira 2005-03-21 05:20:45 UTC
If you have JavaScript popup blocking set to smart ot always, that's the cause.

Do you?
Comment 2 estevam 2005-03-21 15:52:29 UTC
Yes, Smart function.

On 21 Mar 2005 04:20:46 -0000, Thiago Macieira <thiago@kde.org> wrote:
[bugs.kde.org quoted mail]
Comment 3 Thiago Macieira 2005-03-21 19:46:56 UTC
That's the reason. The new-window-opener code blocks the attempt to window.open. That's why you don't see anything happen.

I'm changing this to a wishlist to allow opening when target is _self and the mode is smart.
Comment 4 Maksim Orlovich 2008-10-25 20:11:28 UTC
SVN commit 875819 by orlovich:

Fix how  we find existing frames for the purpose of form target= submission.
This fixes file upload for drupal 6/jquery.form --- its submit  was incorrectly
blocked as a popup attempt

As we refactored this method, also use it for window.open, fixing us blocking 
opens to _self along the way.

While testing this, I noticed that we can crash konq if we do window.open 
and one of the frames doesn't yet have a part yet. Added a workaround 
suggested by dfaure for now, as the proper fix is too risky and should be 
done on unstable branch only.


 M  +15 -22    ecma/kjs_html.cpp  
 M  +21 -2     ecma/kjs_window.cpp  
 M  +2 -0      ecma/kjs_window.h  
 M  +3 -2      khtml_part.cpp  

WebSVN link: http://websvn.kde.org/?view=rev&revision=875819