You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Layout shift when switching between the React/Angular/Vue code tabs in Safari (or any browser on iOS and iPadOS). Does not happen on other desktop/Android browsers.
This was the intended behavior - as a workaround since Safari doesn't support CSS overflow-anchor just yet. That said, I'll leave this open as there might be a better JS solution that preserves the scroll position.
@fennifith I can see if I can implement some JS to account for that vertical jump. I believe I also noticed a flash of unstyled content when it shifts.
@fennifith@Gungier I've created a PR to solve this issue, please have a look. Thanks
Don't think I can do anything about the flash though, it happens because the code tabs above it expand/shrink too much, causing everything to shift before the scroll kicks in. One solution would be to give the code tabs a fixed height (maybe based on screen size instead of an absolute value) with overflow scroll, that should get rid of the flash/content shift.
Unrelated: The scrollIntoView() on handleKeydown is redundant as scrolling is handled by handleClick on tab.click(), so I commented it out.
Description
Layout shift when switching between the React/Angular/Vue code tabs in Safari (or any browser on iOS and iPadOS). Does not happen on other desktop/Android browsers.
Minimal Reproduction
Exception or Error
NA
The text was updated successfully, but these errors were encountered: