AutoFill Handle Shows in Lower Left Corner of Table
AutoFill Handle Shows in Lower Left Corner of Table
I just upgraded to dt 1.10.11 and editor 1.5.5 and now my AutoFill no longer functions. The AutoFill handle (small square box) is now showing up in the lower left corner of entire table instead of lower right of individual cells. Below are the other packages I have included:
cdn.datatables.net/t/dt/jq-2.2.0,dt-1.10.11,b-1.1.2,ef-display-1.0.0,r-2.0.2,se-1.1.2,af-2.1.1/datatables.min.js
Not doing anything custom with the AutoFill:
autoFill: {
editor: editor
}
Any idea what might be causing? Many thx
This question has an accepted answers - jump to answer
Answers
Are you able to link to the page showing the issue please? It appears to work okay in this example.
My best guess is that the AutoFill stylesheet hasn't been included or isn't up to date.
Thanks,
Allan
Hi Allan,
These are stylesheet and js includes:
```
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.11/css/jquery.dataTables.min.css"/>
<link rel="stylesheet" type="text/css" href="https://nightly.datatables.net/autofill/css/autoFill.dataTables.min.css"/>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.1.2/css/buttons.dataTables.min.css"/>
<link rel="stylesheet" type="text/css" href="{{url_for('static', filename='Editor-1.5.5/css/editor.dataTables.min.css') }}"/link>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/select/1.1.2/css/select.dataTables.min.css"/>
```
I just changed the autofill to nightly to give it a try but it did not work.
The page isn't public facing but would be happy to put on jsbin but not sure how to do that with pages that utilize editor?
Thanks
The files that the Editor examples use will work on http://live.datatables.net:
Allan
This is link that has same issue. http://live.datatables.net/yofegamo/1/
Awesome - thanks. This appears to come about from jQuery 1 and jQuery 2 returning different values for
offsetTop()
andoffsetLeft()
when there is no element present. AutoFill uses those values to correct for scrolling in a table, but since you aren't using scrolling and are using jQuery 2 the calculation for where to put the handle results inNaN
!I've committed the fix and if you use the nightly version with your example it works now.
Allan
Thanks Allan