From 061a9e7de3f3426225f73e3cbd59942c1ceae2c8 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Wed, 2 Oct 2024 14:12:45 +0800 Subject: feat: use focus to decide display in overlay layout --- src/Layout.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Layout.mjs') diff --git a/src/Layout.mjs b/src/Layout.mjs index 89a48ae..3c4ea3d 100644 --- a/src/Layout.mjs +++ b/src/Layout.mjs @@ -143,7 +143,7 @@ export class Overlay extends Layout { wrapper.onmouseup = e => { // Hide block with middle click if (e.button === 1) { - wrapper.classList.add('hide') + block.classList.remove('focus') } } @@ -182,7 +182,7 @@ export class Overlay extends Layout { // Close button wrapper.querySelector('#close').onclick = () => { - wrapper.classList.add('hide') + block.classList.remove('focus') utils.removeAttribute('style') } // Plus/Minus font-size of content -- cgit v1.2.3-70-g09d2