(js) Ignore mouse events in scrollbars of Month

Firefox is bubbling the mouse down event on scrollbars so it has to be
ignored for proper drag'n'drop.

Fixes #3990.
pull/234/head
Francis Lachapelle 2017-01-30 15:52:07 -05:00
parent 4143a23afd
commit abccdd304f
1 changed files with 11 additions and 1 deletions

View File

@ -81,10 +81,20 @@
}
function onDragDetect(ev) {
var dragMode, pointerHandler;
var dragMode, pointerHandler, hasVerticalScrollbar, rect;
ev.stopPropagation();
hasVerticalScrollbar = ev.target.scrollHeight > ev.target.clientHeight + 1;
if (hasVerticalScrollbar) {
// Check if mouse click is inside scrollbar
rect = ev.target.getBoundingClientRect();
scrollableZone = rect.left + rect.width - 18;
if (ev.pageX > scrollableZone)
return;
}
dragMode = 'move-event';
if (scope.block && scope.block.component) {