aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorrwldrn <waldron.rick@gmail.com>2010-10-24 12:18:33 -0400
committerrwldrn <waldron.rick@gmail.com>2010-10-24 12:18:33 -0400
commit3b50eaca2cd0b1439235e39c4e98a6438e8f55b2 (patch)
tree6f12ed09790df3d99001d43f8f9e1a514da30452 /src
parent9bd9ebdd73fe0e2d29fadf82947c98adde4023e7 (diff)
downloadjquery-3b50eaca2cd0b1439235e39c4e98a6438e8f55b2.tar.gz
jquery-3b50eaca2cd0b1439235e39c4e98a6438e8f55b2.zip
Fixes #7229 and #5803
Diffstat (limited to 'src')
-rw-r--r--src/ajax.js6
-rw-r--r--src/event.js3
2 files changed, 9 insertions, 0 deletions
diff --git a/src/ajax.js b/src/ajax.js
index a40e223e7..915bbaa3e 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -208,6 +208,12 @@ jQuery.extend({
s.data = jQuery.param( s.data, s.traditional );
}
+ // If the jsonpCallback has been set, we can assume that dataType is jsonp
+ // Ticket #5803
+ if ( s.jsonpCallback ) {
+ s.dataType = "jsonp";
+ }
+
// Handle JSONP Parameter Callbacks
if ( s.dataType === "jsonp" ) {
if ( type === "GET" ) {
diff --git a/src/event.js b/src/event.js
index fb5a3ef8c..d491ae8a1 100644
--- a/src/event.js
+++ b/src/event.js
@@ -32,6 +32,9 @@ jQuery.event = {
if ( handler === false ) {
handler = returnFalse;
+ } else if ( !handler ) {
+ // Fixes bug #7229. Fix recommended by jdalton
+ return;
}
var handleObjIn, handleObj;