Merge pull request #527 from ONLYOFFICE/bugfix/bug-68591

bugfix/bug-68591
This commit is contained in:
Ilya Oleshko 2024-06-27 10:34:25 +03:00 committed by GitHub
commit ccc563c59c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -155,6 +155,14 @@ const SectionBodyContent = (props) => {
}
};
const isHeaderOptionButton = (event) => {
const parent = document.querySelector("#header_optional-button");
if (!parent || !event.target) return false;
return parent.contains(event.target);
};
const onMouseDown = (e) => {
if (
(e.target.closest(".scroll-body") &&
@ -165,7 +173,8 @@ const SectionBodyContent = (props) => {
!e.target.closest(".document-catalog")) ||
e.target.closest(".files-main-button") ||
e.target.closest(".add-button") ||
e.target.closest("#filter_search-input")
e.target.closest("#filter_search-input") ||
isHeaderOptionButton(e)
) {
setSelection([]);
setBufferSelection(null);