diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-08-08 12:45:44 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-08-08 12:45:44 +0900 |
| commit | b3c5c3f0ea07311f42af788daad24d6d23b7148a (patch) | |
| tree | ad44213af5bd703c423c16f10ad2e232029467bf /src | |
| parent | Improve client (diff) | |
| download | misskey-b3c5c3f0ea07311f42af788daad24d6d23b7148a.tar.gz misskey-b3c5c3f0ea07311f42af788daad24d6d23b7148a.tar.bz2 misskey-b3c5c3f0ea07311f42af788daad24d6d23b7148a.zip | |
Improve usability
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/components/ui/popup.vue | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/client/components/ui/popup.vue b/src/client/components/ui/popup.vue index 85df3f432d..c98e17fa25 100644 --- a/src/client/components/ui/popup.vue +++ b/src/client/components/ui/popup.vue @@ -7,7 +7,7 @@ </template> <script lang="ts"> -import { defineComponent } from 'vue'; +import { defineComponent, PropType } from 'vue'; function getFixedContainer(el: Element | null): Element | null { if (el == null || el.tagName === 'BODY') return null; @@ -31,6 +31,7 @@ export default defineComponent({ required: false }, src: { + type: Object as PropType<HTMLElement>, required: false, }, position: { @@ -56,6 +57,9 @@ export default defineComponent({ mounted() { this.$watch('src', () => { + if (this.src) { + this.src.style.pointerEvents = 'none'; + } this.fixed = getFixedContainer(this.src) != null; this.$nextTick(() => { this.align(); @@ -69,7 +73,7 @@ export default defineComponent({ }).observe(popover); }); - document.addEventListener('mousedown', this.onDocumentClick); + document.addEventListener('mousedown', this.onDocumentClick, { passive: true }); }, beforeUnmount() { @@ -155,6 +159,7 @@ export default defineComponent({ }, close() { + if (this.src) this.src.style.pointerEvents = 'auto'; this.showing = false; this.$emit('close'); }, |