mirror of
https://github.com/DataTables/DataTables.git
synced 2025-01-18 11:52:11 +01:00
Dev fix: Commit f2df0716 removed a check for IE6/7 to disable the smart
column width for these tables. However, that was in error - it is in fact required still as the smart width calculations cause the browser to crash (APPCRASH). There is no indication as to why this is, not is it as simple as just disabling one or two pieces of code to stop the crash. This leads me to suspect that it is the number of operations being performed - particularly to do with the cloning of the elements. If this is the case, then its just never going to work. Also IE6/7 are such a small market now (thank goodness) this is just a feature that won't be available in those browsers. If anyone is interested in working on fixing it, or paying me to do so, I'm happy to hear from you :-)
This commit is contained in:
parent
e111fae862
commit
07c04c69f8
@ -1 +1 @@
|
||||
1f6fcea07bd558211528079246e521b1a3376bfb
|
||||
30787605154a1469f8c5254d254fd82b4cface7a
|
||||
|
2
media/js/jquery.dataTables.js
vendored
2
media/js/jquery.dataTables.js
vendored
@ -4140,7 +4140,7 @@
|
||||
* the web- browser. No custom sizes can be set in order for this to happen,
|
||||
* nor scrolling used
|
||||
*/
|
||||
if ( ! userInputs && ! scrollX && ! scrollY &&
|
||||
if ( ie67 || ! userInputs && ! scrollX && ! scrollY &&
|
||||
columnCount == _fnVisbleColumns( oSettings ) &&
|
||||
columnCount == headerCells.length
|
||||
) {
|
||||
|
2
media/js/jquery.dataTables.min.js
vendored
2
media/js/jquery.dataTables.min.js
vendored
@ -56,7 +56,7 @@ z=o.find("tr");y=A.find("tr");A.find("th, td").removeAttr("tabindex");M&&(x=M.cl
|
||||
f);g=s.outerWidth()}else""!==e&&(u.width=t(e),g=s.outerWidth());G(F,y);G(function(a){D.push(a.innerHTML);B.push(t(h(a).css("width")))},y);G(function(a,b){a.style.width=B[b]},z);h(y).height(0);M&&(G(F,x),G(function(a){C.push(t(h(a).css("width")))},x),G(function(a,b){a.style.width=C[b]},N),h(x).height(0));G(function(a,b){a.innerHTML='<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+D[b]+"</div>";a.style.width=B[b]},y);M&&G(function(a,b){a.innerHTML="";a.style.width=C[b]},x);if(s.outerWidth()<
|
||||
g){N=i.scrollHeight>i.offsetHeight||"scroll"==k.css("overflow-y")?g+f:g;if(w&&(i.scrollHeight>i.offsetHeight||"scroll"==k.css("overflow-y")))u.width=t(N-f);(""===c||""!==e)&&I(a,1,"Possible column misalignment",6)}else N="100%";q.width=t(N);j.width=t(N);M&&(a.nScrollFoot.style.width=t(N));!d&&w&&(q.height=t(v.offsetHeight+f));d&&b.bCollapse&&(q.height=t(d),b=c&&v.offsetWidth>i.offsetWidth?f:0,v.offsetHeight<i.offsetHeight&&(q.height=t(v.offsetHeight+b)));b=s.outerWidth();l[0].style.width=t(b);p.width=
|
||||
t(b);l=s.height()>i.clientHeight||"scroll"==k.css("overflow-y");ha="padding"+(ha.bScrollbarLeft?"Left":"Right");p[ha]=l?f+"px":"0px";M&&(n[0].style.width=t(b),m[0].style.width=t(b),m[0].style[ha]=l?f+"px":"0px");k.scroll();if((a.bSorted||a.bFiltered)&&!a._drawHold)i.scrollTop=0}function G(a,b,c){for(var e=0,d=0,f=b.length,g,j;d<f;){g=b[d].firstChild;for(j=c?c[d].firstChild:null;g;)1===g.nodeType&&(c?a(g,j,e):a(g,e),e++),g=g.nextSibling,j=c?j.nextSibling:null;d++}}function Ha(a){var b=a.nTable,c=a.aoColumns,
|
||||
e=a.oScroll,d=e.sY,f=e.sX,g=e.sXInner,j=c.length,i=Z(a,"bVisible"),p=h("th",a.nTHead),l=b.getAttribute("width"),k=b.parentNode,q=!1,m,n,o;o=a.oBrowser;e=o.bScrollOversize;(m=b.style.width)&&-1!==m.indexOf("%")&&(l=m);for(m=0;m<i.length;m++)n=c[i[m]],null!==n.sWidth&&(n.sWidth=Db(n.sWidthOrig,k),q=!0);if(!q&&!f&&!d&&j==aa(a)&&j==p.length)for(m=0;m<j;m++)c[m].sWidth=t(p.eq(m).width());else{j=h(b).clone().css("visibility","hidden").removeAttr("id");j.find("tbody tr").remove();var s=h("<tr/>").appendTo(j.find("tbody"));
|
||||
e=a.oScroll,d=e.sY,f=e.sX,g=e.sXInner,j=c.length,i=Z(a,"bVisible"),p=h("th",a.nTHead),l=b.getAttribute("width"),k=b.parentNode,q=!1,m,n,o;o=a.oBrowser;e=o.bScrollOversize;(m=b.style.width)&&-1!==m.indexOf("%")&&(l=m);for(m=0;m<i.length;m++)n=c[i[m]],null!==n.sWidth&&(n.sWidth=Db(n.sWidthOrig,k),q=!0);if(e||!q&&!f&&!d&&j==aa(a)&&j==p.length)for(m=0;m<j;m++)c[m].sWidth=t(p.eq(m).width());else{j=h(b).clone().css("visibility","hidden").removeAttr("id");j.find("tbody tr").remove();var s=h("<tr/>").appendTo(j.find("tbody"));
|
||||
j.find("thead, tfoot").remove();j.append(h(a.nTHead).clone()).append(h(a.nTFoot).clone());j.find("tfoot th, tfoot td").css("width","");p=qa(a,j.find("thead")[0]);for(m=0;m<i.length;m++)n=c[i[m]],p[m].style.width=null!==n.sWidthOrig&&""!==n.sWidthOrig?t(n.sWidthOrig):"";if(a.aoData.length)for(m=0;m<i.length;m++)q=i[m],n=c[q],h(Eb(a,q)).clone(!1).append(n.sContentPadding).appendTo(s);q=h("<div/>").css(f||d?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(j).appendTo(k);
|
||||
f&&g?j.width(g):f?(j.css("width","auto"),j.width()<k.clientWidth&&j.width(k.clientWidth)):d?j.width(k.clientWidth):l&&j.width(l);if(f){for(m=g=0;m<i.length;m++)n=c[i[m]],d=o.bBounding?p[m].getBoundingClientRect().width:h(p[m]).outerWidth(),g+=null===n.sWidthOrig?d:parseInt(n.sWidth,10)+d-h(p[m]).width();j.width(t(g));b.style.width=t(g)}for(m=0;m<i.length;m++)if(n=c[i[m]],o=h(p[m]).width())n.sWidth=t(o);b.style.width=t(j.css("width"));q.remove()}l&&(b.style.width=t(l));if((l||f)&&!a._reszEvt)b=function(){h(Fa).bind("resize.DT-"+
|
||||
a.sInstance,ua(function(){X(a)}))},e?setTimeout(b,1E3):b(),a._reszEvt=!0}function ua(a,b){var c=b!==k?b:200,e,d;return function(){var b=this,g=+new Date,j=arguments;e&&g<e+c?(clearTimeout(d),d=setTimeout(function(){e=k;a.apply(b,j)},c)):(e=g,a.apply(b,j))}}function Db(a,b){if(!a)return 0;var c=h("<div/>").css("width",t(a)).appendTo(b||R.body),e=c[0].offsetWidth;c.remove();return e}function Eb(a,b){var c=Fb(a,b);if(0>c)return null;var e=a.aoData[c];return!e.nTr?h("<td/>").html(y(a,c,b,"display"))[0]:
|
||||
|
Loading…
x
Reference in New Issue
Block a user