Merge pull request #1198 from ONLYOFFICE/bugfix/fixed-selection-area-drag
Web: Files: fixed dragging, added hiding selection-area after losing …
This commit is contained in:
commit
cba56a1be2
@ -234,6 +234,9 @@ class SelectionArea extends React.Component {
|
||||
passive: false,
|
||||
});
|
||||
document.addEventListener("mouseup", this.onTapStop);
|
||||
|
||||
window.addEventListener("blur", this.onTapStop);
|
||||
|
||||
this.scrollElement.addEventListener("scroll", this.onScroll);
|
||||
};
|
||||
|
||||
@ -242,6 +245,7 @@ class SelectionArea extends React.Component {
|
||||
document.removeEventListener("mousemove", this.onTapMove);
|
||||
|
||||
document.removeEventListener("mouseup", this.onTapStop);
|
||||
window.removeEventListener("blur", this.onTapStop);
|
||||
this.scrollElement.removeEventListener("scroll", this.onScroll);
|
||||
};
|
||||
|
||||
@ -256,7 +260,11 @@ class SelectionArea extends React.Component {
|
||||
folderHeaderHeight,
|
||||
} = this.props;
|
||||
|
||||
if (e.target.closest(".not-selectable")) return;
|
||||
if (
|
||||
e.target.closest(".not-selectable") ||
|
||||
e.target.closest(".row-selected")
|
||||
)
|
||||
return;
|
||||
|
||||
const selectables = document.getElementsByClassName(selectableClass);
|
||||
if (!selectables.length) return;
|
||||
|
Loading…
Reference in New Issue
Block a user