Responsive Javascript file seems to be buggy
Responsive Javascript file seems to be buggy
aldemarcalazans
Posts: 12Questions: 1Answers: 0
Hi. It seems that dataTables.responsive.min.js, in its versions 2.0.1, 2.0.2, 2.1.0, 2.1.1 are all buggy. See:
Inline Google Spreadsheet Viewer - responsive layout not working properly.
The same problem occured with another WordPress plugin:
This discussion has been closed.
Answers
By the the way: the titles of the posts are inverted!
Responsive 2.2.0 is the current version of Responsive. If you are having problems with it, please link to a test case, as noted in the forum rules so we can help to debug it.
Allan
Hi Allan. This is the page where I am using version 2.0.0 of dataTables.responsive.min.js
www10.trf2.jus.br/conciliacao/resultados/resultado-mutiroes-de-conciliacao-2016/
And this is the page where I am using version 2.1.1 of dataTables.responsive.min.js
www10.trf2.jus.br/administracao/resultados-teste/
I am using the WordPress plugin TablePress 1.4, but the problem also happened with another plugin, Inline Google Spreadsheet Viewer, and was solved downgrading the version of the JS file already mentioned.
Thanks for the test case.
I believe the issue is that you need to add either
width="100%"
orstyle="width:100%;"
to the HTML for yourtable
:Without that DataTables can't know that the table is meant to be 100% width (its unbelievably difficult to get a % width out of a stylesheet defined width!) so it doesn't automatically perform its redraw calculations. Adding one of those attributes in should resolve that.
The automated tests in the debugger also indicate this as an issue.
Allan
Allright, although it seems to me that the older code was more inteligent than the new one.
I will try to warn both plugin developers (TablePress and Inline Google Spreadsheet Viewer) about this issue. Otherwise, many people that use these plugins will suffer with the lack of responsiveness of their pages.