Bug Tracker

Modify

Ticket #5951 (closed bug: duplicate)

Opened 3 years ago

Last modified 3 years ago

click() fires click function beforeclick event in 1.4.1 if firefox 3.5.7

Reported by: ron_hook Owned by: brandon
Priority: major Milestone:
Component: event Version: 1.4.1
Keywords: click, firefox, onclick Cc:
Blocking: Blocked by:

Description

The following code...

<input

type="checkbox" value="yes" onclick="search_form_select(this)"

/>

<span onclick="$(this).prev().click();">Search</span>

search_form_select = function(tgt){

if($(tgt).attr("checked")){

return true;

}else{

return false;

}

}

would return true when clicking on the span in 1.4 and earlier.

In 1.4.1 it returns false.

While clicking on the checkbox will return true in both versions.

In 1.4.1 it seems to be running the click function before the click event.

Change History

comment:2 Changed 3 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to duplicate
  • Milestone 1.4.1 deleted

 http://jsfiddle.net/dmethvin/ddyUT/

Sorry but it's not a good idea to mix native and jQuery events, see the duplicate ticket for more information.

comment:3 Changed 3 years ago by dmethvin

Duplicate of #3827.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.