Skip to content

Commit

Permalink
Bug 769028 - Can't scroll using finger documentation in Chrome browse…
Browse files Browse the repository at this point in the history
…r on Android OS
  • Loading branch information
Dimitri van Heesch committed Aug 21, 2016
1 parent f37c0e5 commit 478c147
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions templates/html/resize.js
Expand Up @@ -92,11 +92,10 @@ function initResizable()
$(sidenav).resizable({ minWidth: 0 });
$(window).resize(function() { resizeHeight(); });
var device = navigator.userAgent.toLowerCase();
var ios_or_android = device.match(/(iphone|ipod|ipad|android)/);
if (ios_or_android) { /* wider split bar for touch only devices */
var touch_device = device.match(/(iphone|ipod|ipad|android)/);
if (touch_device) { /* wider split bar for touch only devices */
$(sidenav).css({ paddingRight:'20px' });
$('.ui-resizable-e').css({ width:'20px' });
console.log('ui='+$('.ui-resizable-e').width());
$('#nav-sync').css({ right:'34px' });
barWidth=20;
}
Expand All @@ -108,20 +107,6 @@ function initResizable()
var _preventDefault = function(evt) { evt.preventDefault(); };
$("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault);
$(".ui-resizable-handle").dblclick(collapseExpand);
$(document).bind('touchmove',function(e){
if (ios_or_android) {
try {
var target = e.target;
while (target) {
if ($(target).css('-webkit-overflow-scrolling')=='touch') return;
target = target.parentNode;
}
e.preventDefault();
} catch(err) {
e.preventDefault();
}
}
});
$(window).load(resizeHeight);
}

Expand Down

0 comments on commit 478c147

Please sign in to comment.