From ce66166758b750e0de2863b28a8edbfd84081aa6 Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Thu, 14 Jun 2018 11:40:45 +0100 Subject: [PATCH] Fix: When using `-api order.listener()` with a string selector, an error would be thrown when the element activated the sort. - Many thanks kirik1007 for picking this up! --- .datatables-commit-sync | 2 +- media/js/jquery.dataTables.js | 2 +- media/js/jquery.dataTables.min.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.datatables-commit-sync b/.datatables-commit-sync index c866d89f..fbbb8752 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -e3d03c13372a61e3914228312e466d1f14787207 +0ec78bb95328fdf58cd87b9a1cb05cfd0e59a482 diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index 9870bafb..2e387113 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -6576,7 +6576,7 @@ { $(n) .on( 'click.DT', oData, function (e) { - n.blur(); // Remove focus outline for mouse users + $(n).blur(); // Remove focus outline for mouse users fn(e); } ) .on( 'keypress.DT', oData, function (e){ diff --git a/media/js/jquery.dataTables.min.js b/media/js/jquery.dataTables.min.js index d4a84c25..3df181dd 100644 --- a/media/js/jquery.dataTables.min.js +++ b/media/js/jquery.dataTables.min.js @@ -72,7 +72,7 @@ typeof d&&d(a)}function Ma(a,b,c,d){var e=a.aoColumns[c];Wa(b,{},function(b){!1! columns:h.map(a.aoColumns,function(b,d){return{visible:b.bVisible,search:Ab(a.aoPreSearchCols[d])}})};r(a,"aoStateSaveParams","stateSaveParams",[a,b]);a.oSavedState=b;a.fnStateSaveCallback.call(a.oInstance,a,b)}}function Jb(a,b,c){var d,e,f=a.aoColumns,b=function(b){if(b&&b.time){var g=r(a,"aoStateLoadParams","stateLoadParams",[a,b]);if(-1===h.inArray(!1,g)&&(g=a.iStateDuration,!(0=f.length?[0,c[1]]:c)}));b.search!==k&&h.extend(a.oPreviousSearch,Bb(b.search));if(b.columns){d=0;for(e=b.columns.length;d=c&&(b=c-d);b-=b%d;if(-1===d||0>b)b=0;a._iDisplayStart=b}function Na(a,b){var c=a.renderer,d=n.ext.renderer[b];return h.isPlainObject(c)&&c[b]?d[c[b]]||d._:"string"=== typeof c?d[c]||d._:d._}function y(a){return a.oFeatures.bServerSide?"ssp":a.ajax||a.sAjaxSource?"ajax":"dom"}function ia(a,b){var c=[],c=Kb.numbers_length,d=Math.floor(c/2);b<=c?c=Y(0,b):a<=d?(c=Y(0,c-2),c.push("ellipsis"),c.push(b-1)):(a>=b-1-d?c=Y(b-(c-2),b):(c=Y(a-d+2,a+d-1),c.push("ellipsis"),c.push(b-1)),c.splice(0,0,"ellipsis"),c.splice(0,0,0));c.DT_el="span";return c}function Da(a){h.each({num:function(b){return za(b,a)},"num-fmt":function(b){return za(b,a,Ya)},"html-num":function(b){return za(b, a,Aa)},"html-num-fmt":function(b){return za(b,a,Aa,Ya)}},function(b,c){x.type.order[b+a+"-pre"]=c;b.match(/^html\-/)&&(x.type.search[b+a]=x.type.search.html)})}function Lb(a){return function(){var b=[ya(this[n.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return n.ext.internal[a].apply(this,b)}}var n=function(a){this.$=function(a,b){return this.api(!0).$(a,b)};this._=function(a,b){return this.api(!0).rows(a,b).data()};this.api=function(a){return a?new s(ya(this[x.iApiIndex])):new s(this)};