I am having some scrolling issue when using my website on mobile devices (tested on iPhone).
The issue is that, on mobile, when touching or moving finger outside of the scrollable div, when trying to scroll this div after that, it is blocked until you wait a moment or scroll slowly, or touch it.
https://imgflip.com/gif/75nefo shows my issue. when scroll outside 'scrollable', then when scrolling back into scrollable, it keeps scrolling the whole body and takes a few more tries until it finally scrolls where I want.
The website is the following, as seen in the gif.
body{
margin: 0;
padding: 0;
}
.frame{
display: flex;
flex-direction: column;
width: 100%;
height: 100vh;
background-color: lightblue;
overflow: hidden;
}
.scrollable{
overflow: scroll;
}
.bottom-nav{
width: 100%;
background-color: lightcoral;
padding: 30px 10px;
box-sizing: border-box;
}
.sample-cube{
background-color: lightgreen;
box-sizing: border-box;
padding: 10px;
width: 100%;
height: 200px;
}
.sample-cube + .sample-cube{
margin-top: 10px;
}
<body>
<div class="frame">
<div class="scrollable">
<div class="sample-cube"> this is stuff on the scrollable area</div>
<div class="sample-cube"> </div>
<div class="sample-cube"> </div>
<div class="sample-cube"> </div>
<div class="sample-cube"> </div>
<div class="sample-cube"> </div>
<div class="sample-cube"> </div>
</div>
<div class="bottom-nav">
navigation area with options
</div>
</div>
</body>
I was wondering if there's any way to give the scrollable div a priority so that, whenever it is scrolled on, it scrolls from the first finger touch-swipe instead of being locked...