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) {
|
||||
if (e.originalEvent.target.classList.contains("docked")) {
|
||||
const target = e.originalEvent.target;
|
||||
|
||||
if (
|
||||
target.classList.contains("docked") ||
|
||||
!target.closest(".timeline-container")
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
e.originalEvent.preventDefault();
|
||||
const center = e.center;
|
||||
const $centeredElement = $(document.elementFromPoint(center.x, center.y));
|
||||
if ($centeredElement.parents(".timeline-scrollarea-wrapper").length) {
|
||||
const centeredElement = document.elementFromPoint(e.center.x, e.center.y);
|
||||
if (centeredElement.closest(".timeline-scrollarea-wrapper")) {
|
||||
this.isPanning = false;
|
||||
} else if (e.direction === "up" || e.direction === "down") {
|
||||
this.isPanning = true;
|
||||
|
|
Loading…
Reference in New Issue