Buttons Collection dropup with bootstrap is positioned incorrectly

Buttons Collection dropup with bootstrap is positioned incorrectly

jybleaujybleau Posts: 3Questions: 1Answers: 0

Link to test case:
https://jsfiddle.net/jybleau/ftw4dgx5/

Error and description of the problem:
When using bootstrap 3 CSS, a collection button with dropup = true does not dropup correctly. It still drops down minus 5px instead of up.

I tried to debug in datatables.buttons.js :

The problematic code seems to be at line 1145 var collectionHeight = display.outerHeight();, the display outerHeight is zéro.
By changing the code to var collectionHeight = display.children().outerHeight(); we get the correct dropmenu outerHeight.

Might also have to change the code at line 1061.

PS: the problem could also be that the display object (the collection) shoud have the height of it's children, the dropmenu, already. But I could not find why yet...

NB: I did not test with other Bootstrap versions.
And the dropup is correctly dropping up (!) when using Datatables default CSS as seen here:
https://datatables.net/extensions/buttons/examples/styling/dropup

Thanks

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 52,636Questions: 1Answers: 8,053 Site admin
    Answer ✓

    Thanks! We'll get this sorted out for the next release of Buttons.

    Regards,
    Allan

  • allanallan Posts: 52,636Questions: 1Answers: 8,053 Site admin
    Answer ✓

    Just to say that this has now been resolved here. We'll be pushing the patch release of Buttons out soon.

    Allan

  • jybleaujybleau Posts: 3Questions: 1Answers: 0

    Thanks!

Sign In or Register to comment.