ScrollX Not Working When Sidebar is Collapsed in Chrome

ScrollX Not Working When Sidebar is Collapsed in Chrome

jose_fonsecajose_fonseca Posts: 3Questions: 1Answers: 0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:

Description of problem:

Hi everyone,

I’ve encountered an issue with DataTables' scrollX functionality on my web app. When the sidebar is collapsed, the horizontal scroll no longer works. However, when the sidebar is expanded, the scroll works as expected.

This behavior only occurs in Chrome—the scroll works fine in Safari, Edge, and Firefox regardless of the sidebar state.

The only error message shown in the console is the following, but it appears both when the sidebar is collapsed and expanded:

[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See <URL>

Has anyone come across this issue or know of any workarounds? Are there any known compatibility problems between Chrome and scrollX when paired with dynamic layouts like sidebars?

Any guidance would be greatly appreciated!

Thanks in advance!

Answers

  • allanallan Posts: 63,569Questions: 1Answers: 10,481 Site admin

    What side bar? Can you link to a test case please?

    If you are changing the width of the table container, you'll need to call columns.adjust() once the table is shown at its new width.

    Allan

  • jose_fonsecajose_fonseca Posts: 3Questions: 1Answers: 0

    Hello, Allan.

    I'm currently working on it. It's my first time creating a test case and I'm using JS Bin. Is this the best way?

  • allanallan Posts: 63,569Questions: 1Answers: 10,481 Site admin

    If you can't link to the page you are working on (which is by far the best way), then yes, you could use JS Bin, JS Fiddle or any of many other services that can do that sort of thing.

    Allan

  • jose_fonsecajose_fonseca Posts: 3Questions: 1Answers: 0

    Hello, Allan.
    The problem seems to be solved apparently for Chrome, Safari and Firefox but not Edge.

  • allanallan Posts: 63,569Questions: 1Answers: 10,481 Site admin

    Which is odd since Edge just used the Chrome engine (Blink). What version of Edge are you using?

    Allan

Sign In or Register to comment.