Buttons icon indicating copy to clipboard operation
Buttons copied to clipboard

dt-buttons-collection is appended after the buttons-collection button

Open MHC03 opened this issue 6 years ago • 5 comments

Hi everyone,

in the newer versions of Buttons the .dt-buttons-collection is put right after the .buttons-collection button in the html tree. Before, it was appended to the body element. Could you add an option to decide, where the .dt-buttons-collection window is put to? Now we have the issue, that the newly opened window is cut because of a disabled overflow in the table.

MHC03 avatar Sep 25 '19 13:09 MHC03

Its from 3b530037fec807b5a75533202701bfb4c1f11fd7 in #130 and was to improve accessibility.

Can you show a screenshot of the issue perhaps?

DataTables avatar Sep 25 '19 13:09 DataTables

You can see the issue in following fiddle: https://jsfiddle.net/qmknga7r/2/

MHC03 avatar Sep 25 '19 14:09 MHC03

Thanks. As a workaround you could use multi-column layout for the buttons: https://jsfiddle.net/vfmzd2x4/ .

For use fixed positioning: https://jsfiddle.net/vfmzd2x4/1/ .

DataTables avatar Sep 25 '19 14:09 DataTables

Thank you very much for the workaround!

MHC03 avatar Sep 25 '19 14:09 MHC03

Unfortunately, the workaround seems to not satisfy our requirement for the implemented functionality. Therefore, I would like to ask, if this small issue is going to be tackled somewhen soon. Thank you very much!

MHC03 avatar Nov 26 '19 08:11 MHC03

In the current Buttons software this is the key line:

_fadeIn(display.insertAfter(hostNode), options.fade);

There could be an if condition that changes it to:

_fadeIn(display.appendTo('body'), options.fade);

if options.appendTo === 'body' for example.

It isn't quite as simple as that though - the positioning needs to be updated for the fact that it isn't relative to the Button any more, but still needs to be positioned as such.

Given that this hasn't been requested again I'm inclined to not implement this at the moment, but I don't want to reject it completely as I can see that it could be useful. If someone sends a PR for it, I'd look at that, or if there is more demand for it.

AllanJard avatar Oct 18 '23 16:10 AllanJard