Don't consume if child's not scrollable

Resolve #541.
This commit is contained in:
Hyunje Jun 2016-10-18 16:28:34 +09:00
parent aa63ff0370
commit 06929ae685

View File

@ -62,7 +62,8 @@ function bindMouseWheelHandler(element, i) {
function shouldBeConsumedByChild(deltaX, deltaY) { function shouldBeConsumedByChild(deltaX, deltaY) {
var child = element.querySelector('textarea:hover, select[multiple]:hover, .ps-child:hover'); var child = element.querySelector('textarea:hover, select[multiple]:hover, .ps-child:hover');
if (child) { if (child) {
if (child.tagName !== 'TEXTAREA' && !window.getComputedStyle(child).overflow.match(/(scroll|auto)/)) { if (!window.getComputedStyle(child).overflow.match(/(scroll|auto)/)) {
// if not scrollable
return false; return false;
} }