Closed Bug 2219 Opened 26 years ago Closed 25 years ago

returning false on click event does not interrupt link

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P2)

x86
Windows 95
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: andreww, Assigned: joki)

References

()

Details

In current usage, if I had the following code:
<a href="#" onclick="someFunction();return false">foo</a>
what would happen is the someFunction would get called, but the link to "#"
would not get visited as the returning false "interrupts" the event chain.

What happens now is that Gecko goes ahead and tries to visit "#" which
undo's the image change that you see as a demo.
Clicking the form button which has no link associated with it works ok though.

The URL above may need to be reloaded a few times before it works, XOOM seems to
have some bandwidth problems...
Setting all current Open/Normal to M4.
per leger, assigning QA contacts to all open bugs without QA contacts according
to list at http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser
QA Contact: 4015 → 3847
QA contact re-assigned according to the product areas we're currently working
on.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
This is fixed.  The URL for the test didn't seem to work so I wrote a simple
one.

<HTML>
<BODY>
<a href="http://home.netscape.com" onclick="dump('clicked\n');return
false">Click here to NOT go to netscape.com</a>
</BODY>
</HTML>
Status: RESOLVED → VERIFIED
Verified 1999-06-17-08-M7
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.