ColVis incompatibe with jQuery 1.9.0

ColVis incompatibe with jQuery 1.9.0

stwistwi Posts: 10Questions: 0Answers: 0
edited January 2013 in Bug reports
Hi,

When using DataTables in conjunction with jQuery 1.9.0 and the compatibillity checker "jquery-migrate-1.0.0.js" it will throw this warning when opening the column list with the checkboxes: "JQMIGRATE: jQuery.browser is deprecated".

While the "migrate" tool is included and active it will ensure that the ColVis code still works. However if you use ColVis with jQuery 1.9.0 but without the migrate tool you will observe that the code breaks: you can still open but not close the column list with the checkboxes.

Regards,
Stephan

Replies

  • tristanvanbokkemtristanvanbokkem Posts: 19Questions: 0Answers: 0
    edited February 2013
    Same behaviour as TS.

    Im getting: Uncaught TypeError: Cannot read property 'msie' of undefined

    This is because $.browser is deprecated in 1.9.0:

    See http://stackoverflow.com/questions/14379681/jquery-quicksand-plugin-uncaught-typeerror-cannot-read-property-msie-of-undef

    for more info.
  • tristanvanbokkemtristanvanbokkem Posts: 19Questions: 0Answers: 0
    Very dirty fix:

    Comment lines 856 to 859 in ColVis.js

    //if ( jQuery.browser.msie && jQuery.browser.version == "6.0" )
    //{
    // that._fnDrawCallback();
    //}

    Waiting for Allan to perm fix this.
  • allanallan Posts: 63,685Questions: 1Answers: 10,498 Site admin
    Fix already committed - try the ColVis nightly from: http://datatables.net/download/ - or grab the latest code form github. Not released yet, but will be soon.

    Allan
  • tristanvanbokkemtristanvanbokkem Posts: 19Questions: 0Answers: 0
    edited February 2013
    Thanks. Seems to be fixed indeed!
  • fhomessfhomess Posts: 1Questions: 0Answers: 0
    For what it's worth, I'm still having issues with ColVis and jQuery 1.9. It works fine with 1.8, but with 1.9, when the pop-up fades out, the rest of the page is left unusable. I get the same error as Tristan.
  • allanallan Posts: 63,685Questions: 1Answers: 10,498 Site admin
    Are you using the nightly? Please link to a test case: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read
  • dschu012dschu012 Posts: 1Questions: 0Answers: 0
    I seem to be having a problem with the dropdown not going away with the nightly. I click away from it yet it stays open. I also try clicking on the "Show/Hide Columns" button again but the dropdown list still stays open. This was on both IE8 and Chrome.

    http://jsfiddle.net/vLGh4/
  • allanallan Posts: 63,685Questions: 1Answers: 10,498 Site admin
    You haven't included the ColVis CSS, which defines the background where the click capture happens to hide the menu: http://jsfiddle.net/vLGh4/1/

    Allan
This discussion has been closed.