jquerytools/jquerytools — Issue #557: Scrollable problem in IE 7-8 (IE 6?) + possible patch
Author: libraM
Created: 2011-11-10 12:19:04+00:00
State: open

scrollable.js 1.2.6, jQuery 1.2.6, Windows 7, Internet Explorer 9 in IE7/IE8 mode: error around line 295, something about setting undefined property.

I'm not sure at all that it's scrollable.js' problem, or that my patch (see below) is right for job,
but this quick fix helped me:

```diff
--- scrollable.js	(1.2.6)
+++ scrollable.js	Thu Nov 10 16:03:08 2011
@@ -290,15 +290,16 @@

// touch event
if (conf.touch) {
-	var touch = {};
+	var touch = {}
+	, item = (itemWrap.length > 0 ? itemWrap[0] : itemWrap);

-	itemWrap[0].ontouchstart = function(e) {
+	item.ontouchstart = function(e) {
var t = e.touches[0];
touch.x = t.clientX;
touch.y = t.clientY;
};

-	itemWrap[0].ontouchmove = function(e) {
+	item.ontouchmove = function(e) {

// only deal with one finger
if (e.touches.length == 1 && !itemWrap.is(":animated")) {
```

Note, unmodified scrollable.js 1.2.6 runs in IE 9 (IE9 mode) perfectly well. (When patched, it runs in IE 9 perfectly well too ;-) )