flowbite-react icon indicating copy to clipboard operation
flowbite-react copied to clipboard

Page scroll to Tabs.Group Component

Open itsaboutcode opened this issue 3 years ago • 3 comments

Describe the bug I have created a page, which included a component composed of Tabs.Group and placed it in the middle of the page. Now when I open this page, the page scroll to that component for no reason. Any idea why it's happening?

Project information:

   "flowbite": "^1.5.2",
    "flowbite-react": "^0.1.10",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",

itsaboutcode avatar Aug 29 '22 20:08 itsaboutcode

Could you provide some example? Code? Vídeo? What browser are you using? And so...

rluders avatar Aug 29 '22 20:08 rluders

Here is the sample code. We have noticed that if we remove this, it page starts to scroll to the next last component which has flow-bite components. So this is not specific to any particular flow-bite component.

        <Tabs.Group aria-label="Pills" style="pills" id="tabs-custom">
          <Tabs.Item active={true} title="Clouds">
            <ul className="flex gap-4 flex-wrap">
              <li>
                <img src={googleCloud} alt="" />
              </li>
              <li>
                <img src={aws} alt="" />
              </li>
              <li>
                <img src={salesforce} alt="" />
              </li>
              <li>
                <img src={azure} alt="" />
              </li>
            </ul>
          </Tabs.Item>
          </Tabs.Group>
</div>

itsaboutcode avatar Aug 30 '22 07:08 itsaboutcode

I have the same issue.

When opening a new page, if it contains the flowbite-react Tabs component it will open on that element rather than the top of page as expected.

2-fly-4-ai avatar Oct 09 '22 22:10 2-fly-4-ai

Same to me. Even if you go to the docs page at https://flowbite-react.com/tabs focus goes to last tabs first item

lytonist avatar Oct 25 '22 09:10 lytonist

Probably solved. At least at 0.4.10 it isn't happening in the documentation anymore.

rluders avatar Jul 10 '23 21:07 rluders