fix(frontend): fix Chromatic test fails (#13826)

* fix: attempt to fix Chromatic test fails

* chore: add comment
This commit is contained in:
zyoshoka
2024-05-18 12:42:26 +09:00
committed by GitHub
parent 9b0fc31751
commit def7b8c55e
2 changed files with 11 additions and 2 deletions

View File

@@ -276,8 +276,11 @@ const align = () => {
const onOpened = () => {
emit('opened');
// NOTE: Chromatic テストの際に undefined になる場合がある
if (content.value == null) return;
// モーダルコンテンツにマウスボタンが押され、コンテンツ外でマウスボタンが離されたときにモーダルバックグラウンドクリックと判定させないためにマウスイベントを監視しフラグ管理する
const el = content.value!.children[0];
const el = content.value.children[0];
el.addEventListener('mousedown', ev => {
contentClicking = true;
window.addEventListener('mouseup', ev => {