Bug 102044 - window.open with target=_self is blocked by Smart popup prevention
Summary: window.open with target=_self is blocked by Smart popup prevention
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml ecma (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-21 04:14 UTC by estevam
Modified: 2008-10-25 20:11 UTC (History)
0 users

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 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:
<script>
open('http://www.somlivre.com.br/ProdutoLivro.asp?ProductID=017031&franquiado=323','_self');
</script>
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.

BUG:172073
BUG:102044


 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