Commit 5d224ef6 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Bug 707389 - GENERATE_TREEVIEW=YES disables touch scrolling with Android 3.x

parent c123ae9f
...@@ -77,15 +77,19 @@ function initResizable() ...@@ -77,15 +77,19 @@ function initResizable()
var _preventDefault = function(evt) { evt.preventDefault(); }; var _preventDefault = function(evt) { evt.preventDefault(); };
$("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault);
$(document).bind('touchmove',function(e){ $(document).bind('touchmove',function(e){
try { var device = navigator.userAgent.toLowerCase();
var target = e.target; var ios = device.match(/(iphone|ipod|ipad)/);
while (target) { if (ios) {
if ($(target).css('-webkit-overflow-scrolling')=='touch') return; try {
target = target.parentNode; var target = e.target;
while (target) {
if ($(target).css('-webkit-overflow-scrolling')=='touch') return;
target = target.parentNode;
}
e.preventDefault();
} catch(err) {
e.preventDefault();
} }
e.preventDefault();
} catch(err) {
e.preventDefault();
} }
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment