1. Introducing Channels - a new way to chat with other Android users!
    Dismiss Notice

No scroll bar at DIV in Android browser


Last Updated:

  1. founder

    founder Member This Topic's Starter

    Joined:
    Dec 25, 2009
    Messages:
    20
    Likes Received:
    0
    I just wanted to test how to move on a touchscreen the slider of a scroll bar, but big surprise, there is no scroll bar.

    I have defined a DIV with overflow:auto

    This means when the content of the DIV is greater than the DIV defined with style width and height, there should be scroll bars added to the DIV.

    But at this test page the left menu is larger than the DIV, but no scroll bar is added to the DIV.

    When you test it with an Android cell phone, You will have first scroll the screen to the left.

    I scroll with

    document.body.scrollLeft

    to the right, if the screen is smaller than XVGA
    this feature works fine in the Andoid browser,

    Not only that there is no scroll bar added to the
    DIV overflow=auto, this DIV is also not scrollable,
    by javascript

    Test page where the DIV should be scrolled down

    Here my script tries to hold the menu entry from the current page
    in the visible area of the DIV by

    document.getElementById('dirsub').offsetTop

    But the offsetTop does also not work.
    Any work around?
    Hope for a next browser release?
     

    Advertisement
  2. mkhopper

    mkhopper Well-Known Member

    Joined:
    Oct 15, 2009
    Messages:
    124
    Likes Received:
    9
    I would say that that is just yet another buggy quirk of the stock browser, but the same behavior is also seen when using the Dolphin and Infinity browsers as well, so I'd point the finger at the Webkit rendering engine.

    Check this pretty informative page that shows what works and what doesn't in the many flavors of the Webkit engine based on device. Note that the Overflow directive is shown as "incorrect" for Androids.

    The Great WebKit Comparison Table

    [​IMG]
     
  3. hopsyturvy

    hopsyturvy Member

    Joined:
    Apr 21, 2010
    Messages:
    7
    Likes Received:
    2
    This is reviving an old thread I know, but I can't find much on this elsewhere. Anyone know if 2.2 (froyo) fixes this issue? It's super annoying, I hate it when things work better on the iphone than android (it's pretty rare :p )
     
  4. mewiki

    mewiki New Member

    Joined:
    Jan 24, 2011
    Messages:
    1
    Likes Received:
    0
    A bit late, but it doesn't work on Froyo either. Lets hope it will be added in the Gingerbread release, or the 3.0.
     
  5. jcwayne

    jcwayne Member

    Joined:
    Jan 11, 2011
    Messages:
    5
    Likes Received:
    0
    hi, are there any workaround for this? so scrollbars will show on android browser?
     

Share This Page

Loading...