Core: only preventDefault in specific jQuery versions. Fixes #911

This commit is contained in:
Mottie 2015-05-18 07:57:16 -05:00
parent 3bdf944e8b
commit 4410ecee0b
9 changed files with 27 additions and 23 deletions

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 05-17-2015 (v2.22.1)*/
/*! tablesorter (FORK) - updated 05-18-2015 (v2.22.1)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -1393,7 +1393,7 @@
.find(c.selectorSort).add( $headers.filter(c.selectorSort) )
.unbind(t)
.bind(t, function(e, external) {
var cell,
var cell, temp,
$target = $(e.target),
// wrap event type in spaces, so the match doesn't trigger on inner words
type = ' ' + e.type + ' ';
@ -1410,8 +1410,9 @@
// set timer on mousedown
if ( type.match(' ' + c.pointerDown + ' ') ) {
downTarget = e.target;
// needed or jQuery v1.2.6 throws an error
e.preventDefault();
// needed or jQuery v1.3.2 or older throws an "Uncaught TypeError: handler.apply is not a function" error
temp = $target.jquery.split( '.' );
if ( temp[0] === '1' && temp[1] < 4 ) { e.preventDefault(); }
return;
}
downTarget = null;

File diff suppressed because one or more lines are too long

View File

@ -1391,7 +1391,7 @@
.find(c.selectorSort).add( $headers.filter(c.selectorSort) )
.unbind(t)
.bind(t, function(e, external) {
var cell,
var cell, temp,
$target = $(e.target),
// wrap event type in spaces, so the match doesn't trigger on inner words
type = ' ' + e.type + ' ';
@ -1408,8 +1408,9 @@
// set timer on mousedown
if ( type.match(' ' + c.pointerDown + ' ') ) {
downTarget = e.target;
// needed or jQuery v1.2.6 throws an error
e.preventDefault();
// needed or jQuery v1.3.2 or older throws an "Uncaught TypeError: handler.apply is not a function" error
temp = $target.jquery.split( '.' );
if ( temp[0] === '1' && temp[1] < 4 ) { e.preventDefault(); }
return;
}
downTarget = null;

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 05-17-2015 (v2.22.1)*/
/*! tablesorter (FORK) - updated 05-18-2015 (v2.22.1)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 05-17-2015 (v2.22.1)*/
/*! tablesorter (FORK) - updated 05-18-2015 (v2.22.1)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -1399,7 +1399,7 @@
.find(c.selectorSort).add( $headers.filter(c.selectorSort) )
.unbind(t)
.bind(t, function(e, external) {
var cell,
var cell, temp,
$target = $(e.target),
// wrap event type in spaces, so the match doesn't trigger on inner words
type = ' ' + e.type + ' ';
@ -1416,8 +1416,9 @@
// set timer on mousedown
if ( type.match(' ' + c.pointerDown + ' ') ) {
downTarget = e.target;
// needed or jQuery v1.2.6 throws an error
e.preventDefault();
// needed or jQuery v1.3.2 or older throws an "Uncaught TypeError: handler.apply is not a function" error
temp = $target.jquery.split( '.' );
if ( temp[0] === '1' && temp[1] < 4 ) { e.preventDefault(); }
return;
}
downTarget = null;

View File

@ -1381,7 +1381,7 @@
.find(c.selectorSort).add( $headers.filter(c.selectorSort) )
.unbind(t)
.bind(t, function(e, external) {
var cell,
var cell, temp,
$target = $(e.target),
// wrap event type in spaces, so the match doesn't trigger on inner words
type = ' ' + e.type + ' ';
@ -1398,8 +1398,9 @@
// set timer on mousedown
if ( type.match(' ' + c.pointerDown + ' ') ) {
downTarget = e.target;
// needed or jQuery v1.2.6 throws an error
e.preventDefault();
// needed or jQuery v1.3.2 or older throws an "Uncaught TypeError: handler.apply is not a function" error
temp = $target.jquery.split( '.' );
if ( temp[0] === '1' && temp[1] < 4 ) { e.preventDefault(); }
return;
}
downTarget = null;

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 05-17-2015 (v2.22.1)*/
/*! tablesorter (FORK) - updated 05-18-2015 (v2.22.1)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {