Skip to content
Snippets Groups Projects
Commit 4f22176b authored by syuilo's avatar syuilo
Browse files

perf(frontend): improve performance of contextmenu

Resolve #11303
parent 9f9498c4
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,7 @@
- オフライン時の画面にリロードボタンを追加
- Deckで非ルートページにアクセスした際に簡易UIで表示しない設定を追加
- ロール設定画面でロールIDを確認できるように
- コンテキストメニュー表示時のパフォーマンスを改善
- Fix: サーバーメトリクスが90度傾いている
- Fix: 非ログイン時にクレデンシャルが必要なページに行くとエラーが出る問題を修正
- Fix: sparkle内にリンクを入れるとクリック不能になる問題の修正
......
......@@ -356,9 +356,7 @@ onMounted(() => {
props.textarea.addEventListener('keydown', onKeydown);
for (const el of Array.from(document.querySelectorAll('body *'))) {
el.addEventListener('mousedown', onMousedown);
}
document.body.addEventListener('mousedown', onMousedown);
nextTick(() => {
exec();
......@@ -374,9 +372,7 @@ onMounted(() => {
onBeforeUnmount(() => {
props.textarea.removeEventListener('keydown', onKeydown);
for (const el of Array.from(document.querySelectorAll('body *'))) {
el.removeEventListener('mousedown', onMousedown);
}
document.body.removeEventListener('mousedown', onMousedown);
});
</script>
......
......@@ -61,15 +61,11 @@ onMounted(() => {
rootEl.style.top = `${top}px`;
rootEl.style.left = `${left}px`;
for (const el of Array.from(document.querySelectorAll('body *'))) {
el.addEventListener('mousedown', onMousedown);
}
document.body.addEventListener('mousedown', onMousedown);
});
onBeforeUnmount(() => {
for (const el of Array.from(document.querySelectorAll('body *'))) {
el.removeEventListener('mousedown', onMousedown);
}
document.body.removeEventListener('mousedown', onMousedown);
});
function onMousedown(evt: Event) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment