aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimmy Willison <4timmywil@gmail.com>2017-03-20 12:24:49 -0400
committerTimmy Willison <4timmywil@gmail.com>2017-03-20 12:24:49 -0400
commit4d6b4536b2e0148d4b228884a0b356e73dd8beec (patch)
tree67c143e90f47193eacf1ccb4748f91a362000405
parent473d2ea7d5e4ef0a5b8e0305197f483c136ee4ab (diff)
downloadjquery-4d6b4536b2e0148d4b228884a0b356e73dd8beec.tar.gz
jquery-4d6b4536b2e0148d4b228884a0b356e73dd8beec.zip
Revert "Event: Trigger checkbox and radio click events identically"
This reverts commit b442abacbb8464f0165059e8da734e3143d0721f.
-rw-r--r--src/event.js10
-rw-r--r--src/manipulation.js6
-rw-r--r--src/manipulation/var/rcheckableType.js (renamed from src/var/rcheckableType.js)0
-rw-r--r--src/serialize.js2
4 files changed, 7 insertions, 11 deletions
diff --git a/src/event.js b/src/event.js
index e9c223448..071deb645 100644
--- a/src/event.js
+++ b/src/event.js
@@ -3,15 +3,13 @@ define( [
"./var/document",
"./var/documentElement",
"./var/rnothtmlwhite",
- "./var/rcheckableType",
"./var/slice",
"./data/var/dataPriv",
"./core/nodeName",
"./core/init",
"./selector"
-], function( jQuery, document, documentElement, rnothtmlwhite,
- rcheckableType, slice, dataPriv, nodeName ) {
+], function( jQuery, document, documentElement, rnothtmlwhite, slice, dataPriv, nodeName ) {
"use strict";
@@ -477,11 +475,9 @@ jQuery.event = {
},
click: {
- // For checkable types, fire native event so checked state will be right
+ // For checkbox, fire native event so checked state will be right
trigger: function() {
- if ( rcheckableType.test( this.type ) &&
- this.click && nodeName( this, "input" ) ) {
-
+ if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) {
this.click();
return false;
}
diff --git a/src/manipulation.js b/src/manipulation.js
index eebcd138e..cd225a6db 100644
--- a/src/manipulation.js
+++ b/src/manipulation.js
@@ -2,8 +2,8 @@ define( [
"./core",
"./var/concat",
"./var/push",
- "./var/rcheckableType",
"./core/access",
+ "./manipulation/var/rcheckableType",
"./manipulation/var/rtagName",
"./manipulation/var/rscriptType",
"./manipulation/wrapMap",
@@ -22,8 +22,8 @@ define( [
"./traversing",
"./selector",
"./event"
-], function( jQuery, concat, push, rcheckableType,
- access, rtagName, rscriptType,
+], function( jQuery, concat, push, access,
+ rcheckableType, rtagName, rscriptType,
wrapMap, getAll, setGlobalEval, buildFragment, support,
dataPriv, dataUser, acceptData, DOMEval, nodeName ) {
diff --git a/src/var/rcheckableType.js b/src/manipulation/var/rcheckableType.js
index 25bbcb418..25bbcb418 100644
--- a/src/var/rcheckableType.js
+++ b/src/manipulation/var/rcheckableType.js
diff --git a/src/serialize.js b/src/serialize.js
index 4008093c5..2e28ce1e0 100644
--- a/src/serialize.js
+++ b/src/serialize.js
@@ -1,6 +1,6 @@
define( [
"./core",
- "./var/rcheckableType",
+ "./manipulation/var/rcheckableType",
"./core/init",
"./traversing", // filter
"./attributes/prop"