Loading ...
Sorry, an error occurred while loading the content.

safari click and dblclick in event.js

Expand Messages
  • Peter Michaux
    Hi, In event.js there seems to be a workaround for the Safari dblclick event problem. ... Here is a simple test for this problem
    Message 1 of 2 , Sep 3, 2006
    • 0 Attachment
      Hi,

      In event.js there seems to be a workaround for the Safari dblclick
      event problem.

      --------------------

      Here is a simple test for this problem

      http://web.mit.edu/xavid/www/safari-dblclick-test.html

      With OS X 10.3/Safari 1.3 there is no problem with the single click
      but the dblclick does have a problem with addEventListener.

      With OS X 10.4/Safari 2.0.4 there isn't any problem with either the
      single or double click.

      --------------------

      Why does event.js check if the event is "click" in this line? Did
      earlier versions of Safari have a problem with click in addition to
      dblclick?

      useLegacyEvent: function(el, sType) {
      // snip
      if ("click" == sType || "dblclick" == sType) {


      Also with this setup Safari 2.0 is not allowed to use the DOM2 event
      mechanism. This must be because there isn't any feature checking
      possible for this?


      Thanks,
      Peter
    • Peter Michaux
      ... I suppose the following answers my questions * Safari detection is necessary to work around the preventDefault * bug that makes it so you can t cancel a
      Message 2 of 2 , Sep 4, 2006
      • 0 Attachment
        On 9/3/06, Peter Michaux <petermichaux@...> wrote:
        >
        > Why does event.js check if the event is "click" in this line? Did
        > earlier versions of Safari have a problem with click in addition to
        > dblclick?
        >
        > useLegacyEvent: function(el, sType) {
        > // snip
        > if ("click" == sType || "dblclick" == sType) {

        I suppose the following answers my questions

        * Safari detection is necessary to work around the preventDefault
        * bug that makes it so you can't cancel a href click from the
        * handler. There is not a capabilities check we can use here.

        What is "a href click"? Does that mean clicking on a link in Safari 1.* and 2.0?

        Thanks,
        Peter
      Your message has been successfully submitted and would be delivered to recipients shortly.