Bug 25874 - [test case] javascript onclick event return code ignored in "a href" links
Summary: [test case] javascript onclick event return code ignored in "a href" links
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: khtml ecma (show other bugs)
Version: 3.0
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-05-18 20:48 UTC by Avery Pennarun
Modified: 2005-05-08 20:18 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
test onclick's handling of return values (273 bytes, text/html)
2004-11-16 18:06 UTC, Harri Porten
Details
Test case (311 bytes, text/html)
2005-05-08 20:15 UTC, Harri Porten
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Avery Pennarun 2001-05-18 20:38:29 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           khtml
Version:           3.0 (using KDE 2.1.2 )
Severity:          normal
Installed from:    Debian Package 4:2.1.2-2 (testing/unstable)
Compiler:          gcc version 2.95.4 20010319 (Debian prerelease)
OS:                Linux 2.4.4 i686
OS/Compiler notes: 

I have a problem with konqueror 2.1.1 not aborting a link when the "onclick" event returns false.  This works in Netscape IE etc.

My problem seems to be exactly like bug#17570 but that bug was closed claiming it was fixed back in January.  Well it seems not to be fixed :)

Thanks

Avery

(Submitted via bugs.kde.org)
(Called from KBugReport dialog)
Comment 1 Bryce Nesbitt 2001-08-02 20:15:10 UTC
I see the same problem.  But it's not so easy to track down.
A simple test works perfectly:

<A HREF = "http://bugs.kde.org/"
onClick="confirm('do it');confirm('for sure?')">
test of onclick cancel feature</A>

A complicated test page shows the failure condition:

http://www.intellinetcontrols.com/test.html

Click on any button other than "west" to see it.  No matter how many
return(0) statements I put in Konqurer follows the link.  Netscape and IE
canccel the action as they should.

-Bryce
Comment 2 Harri Porten 2002-03-03 11:59:14 UTC
Too bad the test page is not available anymore. I think it's safe to assume=
=20
that the problem has been fixed meanwhile (for KDE 3.0).
Comment 3 Harri Porten 2004-11-16 18:05:26 UTC
As reported by Mike Cantone (mcantone at skarven dot net)  the problem has appeared again (or has never been fixed properly). See attachment.
Comment 4 Harri Porten 2004-11-16 18:06:46 UTC
Created attachment 8298 [details]
test onclick's handling of return values
Comment 5 Allan Sandfeld 2005-01-27 11:46:54 UTC
Confirming the problem
Comment 6 Harri Porten 2005-05-08 20:15:46 UTC
Created attachment 10944 [details]
Test case

Fixed version
Comment 7 Harri Porten 2005-05-08 20:18:06 UTC
After fixing the test case (didn't work with other browsers either) I can't see a problem anymore. Assuming it is fixed.