By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,481 Members | 1,713 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,481 IT Pros & Developers. It's quick & easy.

Safari 1.3 bug preventDefault() for click on a link

P: n/a
Hi,

The Yahoo! UI event library goes to extremely great lengths to solve
this problem. Their solution is very creative but uses browser
sniffing. In Safari 1.3 (and earlier?) the following example follows
the link when it should not. Does anyone know of any solutions without
browser sniffing?

<p><a id="one" href="http://www.yahoo.com">link cancelled with
e.preventDefault()</a(isn't cancelled in Safari 1.3, is cancelled in
Safari 2)</p>

<script type="text/javascript" charset="utf-8">
document.getElementById('one').addEventListener('c lick',
function(e){e.preventDefault();}, false);
</script>

Thank you,
Peter

Sep 4 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
VK

pe**********@gmail.com wrote:
Hi,

The Yahoo! UI event library goes to extremely great lengths to solve
this problem. Their solution is very creative but uses browser
sniffing. In Safari 1.3 (and earlier?) the following example follows
the link when it should not. Does anyone know of any solutions without
browser sniffing?
Safari 1.0 - 1.x is in fact the buggy Konqueror's engine badly
transpoded for Mac OS. The reasons and means it was made are still a
big mistery but must be some off-programming issues, most probably some
urgent corporate demand to have an environment equally free from the
Microsoft and Mozilla (=GNU) license obligations.

In any case Safari below 2.0 are not functional in the common sense of
the "satisfactory browsing experience". It does not mean of course that
you cannot cover Safari 1.x versions in your scripts, but it is a task
of the kind of having IE4/NN4 universal script - if you understand what
do I mean. Safari was nearly fully rewritten for v.2.0 and now it is
almost functional (besides being beautiful). I would take this version
as the starting point of the compliance considerations and I would let
the previous versions to die in peace (as it was for NN4, IE5 etc.)

IMHO

Sep 4 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.