nul800sebastiaan / Cultiv.Tabify

MIT License
8 stars 4 forks source link

Tabs should be sticky at the top #7

Closed nul800sebastiaan closed 5 years ago

nul800sebastiaan commented 5 years ago

So they don't disappear when you scroll

FransdeJong commented 5 years ago

Is that logical behavior? What happens if you are at the bottom of one tab and click another? Should it scroll to top?

nul800sebastiaan commented 5 years ago

Is that logical behavior?

Yes. 😁 (also see discussion here: https://our.umbraco.com/forum/umbraco-8/93641-discussion-about-tabs#comment-309447)

What happens if you are at the bottom of one tab and click another? Should it scroll to top?

Correct. :-)

FransdeJong commented 5 years ago

Lol, I missed that discussion.

FransdeJong commented 5 years ago

Ok, I've looked in to this.

There are 2 options:

  1. Solve issue in Css pro's: No extra javascript needed. cons: Not supported in IE but fails gracefully (works as it works now)

  2. Solve with javascript pro's: Works in all browsers cons: We need add some jquery or a lot of javascript since:

    • we need to find the correct scrolling parent in case of side by side editing
    • we need to calculate scroll
    • we need to offset the umb-group-panel in case the tabs run over multiple lines and repeat this on resize.

My personal preference would be option 1 since it's the most reliable solution and IE shouldn't be used as a browser anyway.

Opinions?

nul800sebastiaan commented 5 years ago

Definitely don't need IE support IMO, v8 doesn't even officially support it 😊

nul800sebastiaan commented 5 years ago

Fixed in https://github.com/nul800sebastiaan/Cultiv.Tabify/issues/7

v1.0.3 will be up on Our in a few minutes!