no scrollbar for CSS overflow-y:auto and overflow-y:scroll on Android

1,880 views
Skip to first unread message

Xing

unread,
Aug 11, 2015, 9:25:24 PM8/11/15
to blink-dev
I tried the following html on Chrome for Windows 8.1 and Chromium on Android.
<div style="height:4em;overflow-y:auto;position:relative">
Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>
</div>

<div style="height:4em;overflow-y:scroll;position:relative">
Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>Test<br>
</div>

For Chrome for Windows 8.1, it will display scrollbars. 
For Chromium  on Android, no scrollbars, but the content of div can be scrolled..

My question is, is there any background about this? Is there any CL about this?

Any hints will be welcome!

PhistucK

unread,
Aug 12, 2015, 2:12:58 AM8/12/15
to Xing, blink-dev
Android never shows a scroll bar. In most of the applications, anyway - and in all of the browsers. Overlay scroll bars are usually shown only when you scroll.


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Xing

unread,
Aug 17, 2015, 2:09:47 AM8/17/15
to blink-dev, xin...@intel.com
Thanks PhistucK. Is it possible to  enable overlay scrollbar on Android?

Elliott Sprehn

unread,
Aug 17, 2015, 2:46:06 AM8/17/15
to Xing, Rick Byers, blink-dev
+rbyers

On Sun, Aug 16, 2015 at 11:09 PM, Xing <xin...@intel.com> wrote:
Thanks PhistucK. Is it possible to  enable overlay scrollbar on Android?


The scroll bar appears when you scroll. There does seem to be a bug in Chrome that when you switch away from Chrome and then back scrollbars don't appear and then fade out. They do for native apps which is nice because it shows you what's scrollable. In fact all new scrollbars on screen appear and then fade away (ex. when transitioning to a new view), we should do the same in Chrome.

- E

Xing

unread,
Aug 17, 2015, 3:43:20 AM8/17/15
to blink-dev, xin...@intel.com, rby...@chromium.org

Maybe you are referring to the scrollbar of web page(the WebView) ?  Yes, scrollbar is OK for the topmost web page(the WebView).
Here I am referring to the scrollbar of a div element, it is inside the web page.

David Bokan

unread,
Aug 17, 2015, 9:54:27 AM8/17/15
to blink-dev, xin...@intel.com, rby...@chromium.org
I tried this out on dev-channel (your test case is @ bokan.ca/bugs/android-scrollbar.html) and the scrollbar does fade in, it's just hard to see because they're all the way to the right of the screen. Your div is flowing to the width of the page. If you're still seeing a problem please file a bug and CC me on it.

Rick Byers

unread,
Aug 17, 2015, 10:04:44 AM8/17/15
to Elliott Sprehn, Xing, blink-dev
I filed http://crbug.com/521589 to further discuss the specific issue when switching back to chrome.  Thanks Elliott!



- E

Yi Liu

unread,
Sep 23, 2022, 1:39:49 PM9/23/22
to blink-dev, rby...@chromium.org, xin...@intel.com, blink-dev, Elliott Sprehn
Hi, I am searching similar issues and found this thread. Not sure if this thread is still active for comments. 

When I use overflow-y: auto on a div element, on android chrome, there will be a default scrollbar and will fade out if I am not scrolling; 

But on android webview, the default scrollbar does not show. 

Any idea about the different behaviors between android webview vs android chrome?  My device is Galaxy Tab A8, android 11.

Thank you! 
Reply all
Reply to author
Forward
0 new messages