Horizontal scroll bar and information area hide when screen height is reduced
Horizontal scroll bar and information area hide when screen height is reduced

Link to test case: https://berricktest.co.uk/dist/index.htm
Debugger code (debug.datatables.net): ilixej (2.2.2) ayucof(1.13.6)
Error messages shown: n/a
Description of problem: When horizontal scrolling is active ('scrollX': 'true'), the horizontal scroll bar disappears when the screen height is reduced. This did not occur with 1.13.6. I believe the root cause is the change from this dom setting:
'dom': '<"c9tableTools01"Bf><".c9table-body"t><"c9tableTools02"lipr>',
to this layout:
'layout': {
topStart: 'buttons',
topEnd: 'search',
bottomStart: {
info: {
text: 'Displaying _START_ to _END_ of _TOTAL_ events'
}
},
bottomEnd: ''
},
I have made a short video which shows the problem. Please see https://berricktest.co.uk/datatablesScrollbarProblem.mp4
This question has an accepted answers - jump to answer
Answers
In the 1.x version you have a little piece of code in c9review.min.js which is dynamically setting the height of the scrolling container:
You need to update that code for v2's change in class name -
dt-scroll-body
is the class you want.Allan
Hi Allan,

Thanks as usuaal for a speedy reply.
The fix you mentioned was not quite sufficient, but did put me on the right road. I also had to update the style names in routine
c9r_presentationGetAvailableDatatableHeight()
, which was returning NaN.However, even that was not quite enough. The
max-height
that was then successfully set was being overriden by an inline style.I tracked that style down to the specification of
scrollY=67vh
in DataTables initialisation.Prompted by the user comment at the end of the documentation for
scrollY
, I setscrollY=''
.All is now working!
I would appreciate any comments you might like to make about
scrollY=''
, particularly a reassurance that it is not considered an undocumented feature that could disappear.scrollY: ''
is the same as no scrolling in DataTables - see: https://live.datatables.net/yuxenape/1/edit .''
is afalsy
statement, and DataTables is looking for a value there.If that is working for what you want, I'd suggest just taking
scrollY
out.Allan
Thanks Allan. I have removed
scrollY
and all continues to work as I wish.