diff options
author | bobzel <zzzman@gmail.com> | 2020-10-05 14:34:16 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-10-05 14:34:16 -0400 |
commit | 56d9d31d4ac9f2913bec14a2e3c4472fcfd90a7b (patch) | |
tree | bc6401245937f8b4659e3a35171e2e3c7cd97ebf | |
parent | cd68d18b3b72fea20675dcaa9678f6824a60e68c (diff) |
fixed formatted texst box select on load when pdf is full screen and the same pdf is in inactive tab behind it.
-rw-r--r-- | src/client/views/nodes/formattedText/FormattedTextBox.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index b0199b35f..ef39e6a90 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -1124,11 +1124,11 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp } private isActiveTab(el: Element | null | undefined) { - do { - if (el?.className.includes("lm_active")) return true; - el = el?.parentNode as any; - } while (el !== document.body); - return false; + while (el && el !== document.body) { + if (getComputedStyle(el).display === "none") return false; + el = el.parentNode as any; + } + return true; } private setupEditor(config: any, fieldKey: string) { |