enyo.Scroller failing in iOS 4.3 (simulator)

edited March 2012 in Enyo 2
I'm building a simple Enyo 2.0 app, and in testing it works great in iOS 5 with the native touch scrolling. However, when I test it on iOS 4, I'm able to drag the scroller around, but when I let it go it just returns to the initial unscrolled position.

Has anyone else run into this problem? I'm unsure if it's a configuration error on my end, or a bug in enyo.Scroller. Here's my basic code:

Javascript
components: [
    {name: "listScroller", kind: "enyo.Scroller", nofit: true, classes: "recent-items-scroller", components: [
        // A couple of controls here: empty message (which gets hidden if content),
        // and a generic compoment that is populated via DOM methods
    ]}
]
CSS
.recent-items-scroller {
    position: absolute;
    top: 94px;
    left: 24px;
    right: 24px;
    bottom: 108px;
    padding: 24px 2px 0;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
}

.enyo-touch-scroller {
    overflow: hidden;
}
I have tested with the latest bleeding edge Enyo code, including all improvements to the scroller (commit 426c8147... on March 12).

Comments

  • iOS 5 was the version that added -webkit-overflow-scrolling support. See http://fioravengi.blogspot.com/2011/06/implications-of-ios-5-webkit-overflow.html

    If you remove that attribute, is behavior the same? Broken? I don't think we've been testing with older versions of iOS.
  • Yep, I'm aware that -webkit-overflow-scrolling is an iOS 5 thing. As I understand enyo.Scroller, it should leave scrolling mostly alone for desktops, iOS 5, and anything else that can handle scrolling natively, but provide a touch-based manual scroller for systems that do not have built-in scrolling handling. The touch-based manual scroller in iOS 4.3 appears to be partially working (I can drag the scrollers contents up and down), but it doesn't actually change the position when I let go (instead just animates back to the top scroll position).

    The behavior in iOS 4.3 is unchanged if I remove -webkit-overflow-scrolling, but on iOS 5 I lose all flick scrolling, the scrollbar, and similar niceties.
  • Thanks... please file a github issue on this so we can track it.
  • Done; let me know if you guys are not able to reproduce the issue.
  • Incidentally for anyone else who happens across this problem, I ended up forking the Enyo project and fixing this issue myself. My pull request is still pending at the time of this writing (I presume they'll need to give it a pretty solid code review and test before integrating it in the core project), but if you stumble across the issue prior to the pull being accepted or them coming up with a fix of their own, you can find the forked code here in the scroll-fixes branch:

    https://github.com/onecrayon/enyo/
Sign In or Register to comment.