Google Groups Home
Help | Sign in
isLeftClick Bug in Proto 1.6.0 RC1
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Bart Lewis  
View profile
 More options Oct 17 2007, 5:20 pm
From: Bart Lewis <bartle...@gmail.com>
Date: Wed, 17 Oct 2007 21:20:04 -0000
Local: Wed, Oct 17 2007 5:20 pm
Subject: isLeftClick Bug in Proto 1.6.0 RC1
Today I updated to Prototype 1.6.0 RC1 from RC0. I am also using
Scriptaculous 1.8 preview.

Beyond changing my "contentloaded" to "dom:loaded" the transition
seemed to go fairly smoothly. Until I encountered the following error
in IE (6 and 7):

Drags created with "new Draggable(...)" no longer drag.

I traced this back to prototype's "isLeftClick" always returning
false.

Looks like isLeftClick was significantly changed just yesterday:
http://dev.rubyonrails.org/changeset/7926

-B


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mislav Marohnić  
View profile
 More options Oct 17 2007, 5:30 pm
From: "Mislav Marohnić" <mislav.maroh...@gmail.com>
Date: Wed, 17 Oct 2007 23:30:59 +0200
Local: Wed, Oct 17 2007 5:30 pm
Subject: Re: [Prototype-core] isLeftClick Bug in Proto 1.6.0 RC1

On 10/17/07, Bart Lewis <bartle...@gmail.com> wrote:

> Looks like isLeftClick was significantly changed just yesterday:
> http://dev.rubyonrails.org/changeset/7926

... and it was fixed today: http://dev.rubyonrails.org/changeset/7954

Thanks for reporting, though. Everyone who has troubles with this should
upgrade to latest trunk.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Quadling  
View profile
 More options Oct 18 2007, 6:42 am
From: "Richard Quadling" <rquadl...@googlemail.com>
Date: Thu, 18 Oct 2007 11:42:22 +0100
Local: Thurs, Oct 18 2007 6:42 am
Subject: Re: [Prototype-core] isLeftClick Bug in Proto 1.6.0 RC1
On 17/10/2007, Bart Lewis <bartle...@gmail.com> wrote:

Yes it was. Here is the new code you need for the
is[Left|Middle|Right]Click to work.

Around line 3700-ish.

Event.Methods = (function() {
  var isButton;

  if (Prototype.Browser.IE) {
    var buttonMap = { 0: 1, 1: 4, 2: 2 };
    isButton = function(event, code) {
      return event.button == buttonMap[code];
    };

  } else if (Prototype.Browser.WebKit) {
    isButton = function(event, code) {
      switch (code) {
        case 0: return event.which == 1 && !event.metaKey;
        case 1: return event.which == 1 && event.metaKey;
        default: return false;
      }
    };

  } else {
    isButton = function(event, code) {
      return event.which ? (event.which === code + 1) : (event.button === code);
    };
  }
  return {
    isLeftClick:   function(event) { return isButton(event, 0) },
    isMiddleClick: function(event) { return isButton(event, 1) },
    isRightClick:  function(event) { return isButton(event, 2) },

...

--
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google