Skip to content

Commit 4d6b453

Browse files
committed
Revert "Event: Trigger checkbox and radio click events identically"
This reverts commit b442aba.
1 parent 473d2ea commit 4d6b453

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

src/event.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@ define( [
33
"./var/document",
44
"./var/documentElement",
55
"./var/rnothtmlwhite",
6-
"./var/rcheckableType",
76
"./var/slice",
87
"./data/var/dataPriv",
98
"./core/nodeName",
109

1110
"./core/init",
1211
"./selector"
13-
], function( jQuery, document, documentElement, rnothtmlwhite,
14-
rcheckableType, slice, dataPriv, nodeName ) {
12+
], function( jQuery, document, documentElement, rnothtmlwhite, slice, dataPriv, nodeName ) {
1513

1614
"use strict";
1715

@@ -477,11 +475,9 @@ jQuery.event = {
477475
},
478476
click: {
479477

480-
// For checkable types, fire native event so checked state will be right
478+
// For checkbox, fire native event so checked state will be right
481479
trigger: function() {
482-
if ( rcheckableType.test( this.type ) &&
483-
this.click && nodeName( this, "input" ) ) {
484-
480+
if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) {
485481
this.click();
486482
return false;
487483
}

src/manipulation.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ define( [
22
"./core",
33
"./var/concat",
44
"./var/push",
5-
"./var/rcheckableType",
65
"./core/access",
6+
"./manipulation/var/rcheckableType",
77
"./manipulation/var/rtagName",
88
"./manipulation/var/rscriptType",
99
"./manipulation/wrapMap",
@@ -22,8 +22,8 @@ define( [
2222
"./traversing",
2323
"./selector",
2424
"./event"
25-
], function( jQuery, concat, push, rcheckableType,
26-
access, rtagName, rscriptType,
25+
], function( jQuery, concat, push, access,
26+
rcheckableType, rtagName, rscriptType,
2727
wrapMap, getAll, setGlobalEval, buildFragment, support,
2828
dataPriv, dataUser, acceptData, DOMEval, nodeName ) {
2929

src/serialize.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
define( [
22
"./core",
3-
"./var/rcheckableType",
3+
"./manipulation/var/rcheckableType",
44
"./core/init",
55
"./traversing", // filter
66
"./attributes/prop"

0 commit comments

Comments
 (0)