diff --git a/posimai-sc/index.html b/posimai-sc/index.html index d71b8a19..e2c59a89 100644 --- a/posimai-sc/index.html +++ b/posimai-sc/index.html @@ -913,7 +913,7 @@ header{display:flex;align-items:center;justify-content:space-between;padding:0 1 -
+
diff --git a/posimai-sc/js/app.js b/posimai-sc/js/app.js index 4caedce2..da2d0726 100644 --- a/posimai-sc/js/app.js +++ b/posimai-sc/js/app.js @@ -824,6 +824,9 @@ document.addEventListener('alpine:init', () => { this.$nextTick(()=>{ if(window.lucide) lucide.createIcons(); }); }, finishStepMode(){ + if(document.activeElement && typeof document.activeElement.blur === 'function'){ + document.activeElement.blur(); + } this.stepMode=false; this.$nextTick(()=>{ if(window.lucide) lucide.createIcons(); @@ -833,6 +836,9 @@ document.addEventListener('alpine:init', () => { }); }, scrollToComprehension(){ + if(document.activeElement && typeof document.activeElement.blur === 'function'){ + document.activeElement.blur(); + } this.$nextTick(()=>{ requestAnimationFrame(()=>{ requestAnimationFrame(()=>{ this.scrollMainToComprehension(); }); @@ -844,6 +850,7 @@ document.addEventListener('alpine:init', () => { const m=document.getElementById('main'); const el=document.getElementById('comprehension-quiz'); if(!m||!el) return; + try{ el.focus({ preventScroll:true }); }catch(e){} // main内の実座標で算出して、カード先頭へ安定して合わせる const offset=8; const top=(el.getBoundingClientRect().top - m.getBoundingClientRect().top) + m.scrollTop - offset;