material-web icon indicating copy to clipboard operation
material-web copied to clipboard

mwc-tabs don't appear to support scrolling on desktop

Open iantrich opened this issue 4 years ago • 4 comments

** PLEASE READ THIS BEFORE FILING AN ISSUE **

I'm submitting a:

  • [x] bug report
  • [ ] feature request

What OS are you using? Windows 10

What browser(s) is this bug affecting: Chrome Version 77.0.3865.75 (Official Build) (32-bit)

Current behavior: Unable to scroll through tabs in browser

Expected behavior: Using a mouse you should be able to scroll through tabs

Steps to reproduce: https://material-components.github.io/material-components-web-components/demos/tabs.html

If you shrink your desktop browser so that the "Scrolling" example does not display all ten tabs, you'll find that there is no way to scroll through them using your mouse unless you click and use the mouse wheel. On mobile, it works as expected.

Related code:

// insert any relevant code here or add a include a codepen

Other information:

iantrich avatar Sep 17 '19 20:09 iantrich

Why is this low severity? This makes the tabs pretty much useless on a desktop?

The paper tabs could be dragged by the mouse and had arrows on both sides. This has neither and thus a tab bar with a lot of tabs is not useable.

bramkragten avatar Sep 10 '20 20:09 bramkragten

Scrolling the tab bars works for me with horizontal touchpad scrolling on macOS 11 and Chrome 87.

ForestKatsch avatar Nov 23 '20 05:11 ForestKatsch

Yes, it works with normal scroll events, but that is not something a user with a mouse will likely use. They will click and drag the tabs, and that is no longer possible. That is also how it used to work with paper-tabs.

bramkragten avatar Nov 23 '20 19:11 bramkragten

Additionally I think the tab bar should have indicators to let the user know that there are tabs to the left or right. Depending on the width of the tab-bar and the visible tabs, it may not be obvious that there is any more than what is showing.

johnthad avatar Sep 01 '21 19:09 johnthad

Obsolete with M3 once tabs are ready

asyncLiz avatar Apr 24 '23 21:04 asyncLiz