Bug Tracker

Opened 12 years ago

Closed 12 years ago

#8480 closed bug (invalid)

Binding 'click' and 'dblclick' not working in JQuery 1.5.1

Reported by: anonymous Owned by: anonymous
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:

Description

In JQuery 1.5, the following commands worked fine (I realize these are somewhat meaningless out of context, I'm just providing them as an example):

expandedRow.bind('dblclick', { eleLoc: eleLoc, requestID: data.requestID }, function (event) { closeRow(event.data.eleLoc, event.data.requestID) });

and:

innerTestCountLink.bind('click', { requestID: data.requestID, testName: data.result[i].desc }, function (event) { event.stopImmediatePropagation(); ajaxGetTestIDs(event.data.requestID, event.data.testName, event.target); });

In JQuery 1.5.1 they no longer seem to work.

Change History (6)

comment:1 Changed 12 years ago by anonymous

I apologize for leaving out details. This was in Internet Explorer 8, on Windows 7. What should happen is that in the first case, doubleclicking on an expanded row will close it, but it does nothing (in JQuery 1.5, it worked as it was supposed to). In the second case, it should retrieve a list of test IDs from a database and display them. As before, in JQuery 1.5 it worked as it was supposed to.

comment:2 Changed 12 years ago by dmethvin

Owner: set to anonymous
Status: newpending

You're right, they are meaningless out of context and not enough to track down a bug. Please provide a test case in jsfiddle as requested in the bug reporting guidelines and red box below.

comment:3 in reply to:  2 Changed 12 years ago by anonymous

Status: pendingnew

Replying to dmethvin:

You're right, they are meaningless out of context and not enough to track down a bug. Please provide a test case in jsfiddle as requested in the bug reporting guidelines and red box below.

http://jsfiddle.net/XGCvj/1/

comment:4 Changed 12 years ago by dmethvin

Status: newpending

Sorry but I don't understand the test case. What should I click to expose the bug you describe?

comment:5 in reply to:  4 Changed 12 years ago by anonymous

Status: pendingnew

Replying to dmethvin:

Sorry but I don't understand the test case. What should I click to expose the bug you describe?

I removed the first link and reposted it here:

http://jsfiddle.net/XGCvj/5/

I should be able to click Link2, and the event handler will pass temp to the test function, and an alert displaying "hello" will be displayed to the screen. Instead, nothing seems to happen.

I tried to match the format of the two function calls in the original post, which are the function calls I was having the problem with. For example, in the following:

expandedRow.bind('dblclick', { eleLoc: eleLoc, requestID: data.requestID }, function (event) { closeRow(event.data.eleLoc, event.data.requestID) });

I doubleclick on an expanded row, which will close the row using the data from the event handler defined in the second parameter. In JQuery 1.5, this works exactly as it should; double-clicking on an expanded row will cause it to close. In JQuery 1.5.1, nothing happens.

The test program I posted in JSFiddle tries to mirror the format I use for the two calls I posted in the original bug report, but in a simplified way since I can't post the code of the entire page I'm having an issue with due to a variety of reasons (proprietary data, needs MVC to make server calls, long and overly complex code for a bug report, etc). It's not exactly the same as what I'm trying to do, but the format I use for bind in the JSFiddle program and the format I use for bind in the original post where I was having the problem are the same, and therefore the bug should be visible in both cases.

comment:6 Changed 12 years ago by john

Resolution: invalid
Status: newclosed

Looks like you had two IDs on your element: http://jsfiddle.net/XGCvj/11/

Note: See TracTickets for help on using tickets.