My latest project involved building a TabbarController that allows users to swipe through different tabs. To enable this functionality, I utilized 'touchstart', 'touchmove' & 'touchend' events. However, I encountered an issue where scrolling in one tab would trigger the parent container to scroll as well, disrupting the user experience. This led me to wonder if there is a way to restrict the scroll behavior to the child tab only and prevent touch events from being passed on to the parent container.
I experimented with solutions such as applying 'overflow:hidden' to the parent div and attempting to use 'preventDefault()' on touch events, but have yet to find a satisfactory resolution.