(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
parent
4143a23afd
commit
abccdd304f
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue