No scroll bar at DIV in Android browser

Discussion in 'Android Apps & Games' started by founder, Dec 25, 2009.

  1. founder

    founder Member
    15

    Dec 25, 2009
    20
    0
    15
    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
    36

    Oct 15, 2009
    124
    9
    36
    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
    6

    Apr 21, 2010
    7
    2
    6
    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
    5

    Jan 24, 2011
    1
    0
    5
    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
    5

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

Share This Page

Loading...