Summary: | Smart popup policy fails on sharereactor.com | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Ralf Holzer <kdebugs> |
Component: | kjs | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 4.0 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
Testcase for sharereactor.com popup code
Patch for kjs_html.cpp |
Description
Ralf Holzer
2003-05-18 20:30:42 UTC
Can you create a separate testcase of it and attach it to this report, please? The site seems to be down for me. Created attachment 1639 [details]
Testcase for sharereactor.com popup code
The reason why the policy fails here, is that the JavaScript code calls a form.submit(). The form has a target with a non-existent frame name, so it will open a new window. The existing popup blocking code is not called at all. I tried to fix this myself, the patch is attached. Its a little ugly because it duplicates the MessageBox code from kjs_bindings.cpp. It basically checks the following things: 1) Is the current page not within a frameset? -> Ask/Deny 2) Does a frame with the form target exist somewhere? -> Allow submit 3) Is no target specified for form? -> Allow submit I hope the code is not too messy. I've seen several pages now that use this trick to get around popup blockers and its really getting on my nerves. Ralf Created attachment 1689 [details]
Patch for kjs_html.cpp
Fixed in CVS. |