debug: capture PWA composer-focus viewport state (scale/scroll/font) to diagnose the zoom (batch138)
This commit is contained in:
@@ -1158,7 +1158,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<script src="/icons.js?v=6"></script>
|
||||
<script>window.__BUILD='2026-07-19-batch137';console.log('%cBiz Connect','color:#1F3B73;font-weight:bold','build '+window.__BUILD);
|
||||
<script>window.__BUILD='2026-07-19-batch138';console.log('%cBiz Connect','color:#1F3B73;font-weight:bold','build '+window.__BUILD);
|
||||
// Emoji are rendered with the OS's own (colour) emoji font — instant, zero network.
|
||||
//
|
||||
// We used to run Twemoji over every emoji, which swapped each one for an <img> pulled INDIVIDUALLY from
|
||||
@@ -2911,6 +2911,7 @@ async function openConvo(kind,id){
|
||||
inpEl.addEventListener('input', ()=>{ maybeAutocorrect(inpEl); autoGrow(inpEl); setDraft(kind,id,inpEl.value); noteTyping(); }); // auto-correct common typos, keep the draft in sync + emit "typing…"
|
||||
inpEl.addEventListener('blur', ()=>{ stopTyping(); setTimeout(()=>{ const a=document.activeElement; const stillTyping=a&&(a.tagName==='TEXTAREA'||a.tagName==='INPUT'); if(!stillTyping && window.__bzResetKb) window.__bzResetKb(); }, 120); }); // #1: composer lost focus → keyboard is closing → drop the --kb lift so no empty gap remains
|
||||
inpEl.addEventListener('keydown', (e)=>{ if(e.key==='Enter' && !e.shiftKey && !isMobileUA()){ if(mentionItems && mentionItems.length) return; e.preventDefault(); sendMessage(); } }); // Desktop: Enter sends, Shift+Enter = newline. Mobile: the Return key inserts a newline (default) — you send with the send button, like every native chat app.
|
||||
inpEl.addEventListener('focus', ()=>{ setTimeout(()=>{ try{ var vv=window.visualViewport; var se=document.scrollingElement||document.documentElement; if(window.bzDbg) window.bzDbg('pwaFocus',{ scale: vv?Math.round(vv.scale*100)/100:0, vvW: vv?Math.round(vv.width):0, vvH: vv?Math.round(vv.height):0, vvTop: vv?Math.round(vv.offsetTop):0, innerW: window.innerWidth, innerH: window.innerHeight, clientH: document.documentElement.clientHeight, scrollY: Math.round((se&&se.scrollTop)||window.scrollY||0), compFont: getComputedStyle(inpEl).fontSize, kb: getComputedStyle(document.documentElement).getPropertyValue('--kb').trim(), disp: (window.matchMedia('(display-mode: standalone)').matches?'standalone':'browser'), dpr: window.devicePixelRatio }); }catch(e){} }, 400); }); // TEMP: capture what actually happens on composer focus in the PWA (scale=zoom? scrollY=page pushed? compFont=is 16px applied?)
|
||||
// Desktop: LEFT-click a red-squiggled word → native spelling suggestions right there (the shell
|
||||
// pops a suggestions menu only if the clicked word is actually misspelled). No right-click needed.
|
||||
if(window.bizConnectNative && window.bizConnectNative.spellSuggestAt){
|
||||
|
||||
Reference in New Issue
Block a user