question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scroll-bars appear always on table in Windows

See original GitHub issue

Bug Report

Vertical Scroll bars are displayed always on table even when there is no content to scroll.

Description

Terra-Table has overflow-y:scroll style property for both table header and body when fill prop is set to true on table. overflow-y:scroll property causes scroll-bars to appear always in Windows.

Steps to Reproduce

  1. Open IE or any browsers in Windows
  2. Navigate to : https://engineering.cerner.com/terra-core/tests/terra-table/table/fill
  3. Observe vertical scroll bar appears even when no content is hidden.

Additional Context / Screenshots

Screen Shot 2021-07-22 at 4 45 05 PM

Same can be seen on terra-table WDIO screenshots as well : https://github.com/cerner/terra-core/blob/main/packages/terra-table/tests/wdio/__snapshots__/reference/terra-default-theme/en/chrome_medium/table-spec/fill.png

Expected Behavior

scroll-bar should display only when content is overflown.

Possible Solution

Replacing the overflow-y:scroll property with overflow-y:auto will make scroll bar to display only when it is required and removes empty scrolls from windows browsers and from terra-wdio-screen shots as well.

Environment

  • Component Name and Version:
  • Browser Name and Version: Chrome Windows, IE, Chromium Windows
  • Node/npm Version: [e.g. Node 8/npm 5]
  • Webpack Version:
  • Operating System and version (desktop or mobile): Windows

@ Mentions

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
tbiethmancommented, Aug 26, 2021

@supreethmr I believe everything is working as expected in both operating systems. macOS has a setting (System Preferences > General > Show scroll bars) that cause the discrepancy you are seeing depending on whether the trackpad or a mouse is used. When set to “Always” or when a mouse is used, the scrollbars will always be visible like in your windows screenshot.

I think the most important thing here is that the column headers continue to align with or without the scrollbars visible. You have a screenshot above that shows a misalignment (visible scrollbar on body but not the header). Is that reproducible in released code?

1reaction
ryanthemanuelcommented, Jul 29, 2021

@supreethmr, this is actually by design. Parsing through old conversations with Dave Kasper:

“It’s a visual bug in IE, but we cannot disable the rule as it’s only this allowing the columns to align when using a fixed header implementation. All other browser reserve the inset scroll bar width, but hides the controls, IE doesn’t bother to hide them”

Read more comments on GitHub >

github_iconTop Results From Across the Web

Show scroll bars in Word or Excel - Microsoft Support
On the Advanced tab, scroll to the Display section. ... Click General. Under Show scroll bars, choose Always and then close the dialog....
Read more >
How do I keep the horizontal scroll bar visible in a responsive ...
Use the container .table-responsive! With that you can display the scrollbar. You need to change overflow to auto and than it should work...
Read more >
Table row sometimes covered up by scrollbars - Vaadin
The only "solution" I've found is to always set the Table.setPageLength to be 1 bigger than my container size so that the scrollbars,...
Read more >
How To Force (Always Show) Scrollbars With CSS - W3Schools
How To Force / Always Show Scrollbars. Add overflow: scroll; to show both the horizontal and vertical scrollbar: Example. body {
Read more >
Table Scrollbars not always usable · Issue #52136 - GitHub
The table does seem to have a preferred height, which may lead to the horizontal scrollbar also not being accessible.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found