FIX: Limit pan event handler to fix scrolling in TOC (#16673)
This commit is contained in:
parent
ab6ca78486
commit
54759b7e8c
|
@ -168,14 +168,18 @@ export default Component.extend(PanEvents, {
|
||||||
},
|
},
|
||||||
|
|
||||||
panStart(e) {
|
panStart(e) {
|
||||||
if (e.originalEvent.target.classList.contains("docked")) {
|
const target = e.originalEvent.target;
|
||||||
|
|
||||||
|
if (
|
||||||
|
target.classList.contains("docked") ||
|
||||||
|
!target.closest(".timeline-container")
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
e.originalEvent.preventDefault();
|
e.originalEvent.preventDefault();
|
||||||
const center = e.center;
|
const centeredElement = document.elementFromPoint(e.center.x, e.center.y);
|
||||||
const $centeredElement = $(document.elementFromPoint(center.x, center.y));
|
if (centeredElement.closest(".timeline-scrollarea-wrapper")) {
|
||||||
if ($centeredElement.parents(".timeline-scrollarea-wrapper").length) {
|
|
||||||
this.isPanning = false;
|
this.isPanning = false;
|
||||||
} else if (e.direction === "up" || e.direction === "down") {
|
} else if (e.direction === "up" || e.direction === "down") {
|
||||||
this.isPanning = true;
|
this.isPanning = true;
|
||||||
|
|
Loading…
Reference in New Issue