Problem
I'm using Calendar with the jCalendar popup windows to display event content. This is great, except when the popup window needs a scrollbar (for events with long descriptions) there are some mobile devices on which:
- the scroll bar doesn't display, and
- single finger scrolling of the popup window doesn't work
I'm thinking specifically of iPhones and iPod touch devices previous to iOS5. Better scrolling behavior was introduced with iOS5 (http://johanbrook.com/browsers/native-momentum-scrolling-ios-5/).
Possible solution
Support the iScroll library (http://cubiq.org/iscroll-4). This makes it so a scrollbar appears and single-finger scrolling works on iOS previous to version 5.
A patch is attached. Libraries API is used, and if the iScroll library is in the sites/all/libraries directory then jCalendar will use it. If not it won't.
Note that the iScroll library seems to need to be called with the selector for the existing page element which will be scrolled:
new iScroll('calpopup-body')
And because of that, it is necessary to add that inside the AJAX callback which fills in the popup body:
// If sucessful call this
function domCallback(msg) {
$('#calpopup-body').html(msg);
+
+ // use the iScroll library, if installed, on touch screen devices.
+ if (isTouchDevice() && typeof iScroll == 'function') {
+ var myScroll = new iScroll('calpopup-body');
+ }
}
(I understand if this is too specific to be included; mostly just wanted to get a patch up here for future reference and so others who may have had this issue have somewhere to start. Thanks!).
Comment | File | Size | Author |
---|---|---|---|
jCalendar-support-for-iScroll.patch | 2.71 KB | shark | |
Comments
Comment #1
shark CreditAttribution: shark commentedPeople interested in the usability issue of two-finger scrolling might want to read this:
http://www.uxbooth.com/blog/5-ios-behaviors-your-users-probably-don%E2%8...
As noted here, there are other solutions if people are interested in them (I wasn't, for this particular project).
Comment #2
Neslee Canil PintoThe D6 branch is no longer supported so we're closing this issue. If you think this issue still exists in D7 you can open a new one.