openRequestInfo() relies on a fixed setTimeout(150) to prefill/focus fields, but openDetail() is async (fetch + DOM update) so the timeout can fire before the modal inputs exist (especially on slow networks). Make openRequestInfo async and await openDetail(id) (or otherwise signal when the modal is rendered) before reading/writing #cMsg/#cName.
async function openRequestInfo(id, address) {
await openDetail(id);
const msg = document.getElementById('cMsg');
if (msg && !msg.value) msg.value = `I'd like more information about: ${address}`;
const nameEl = document.getElementById('cName');
if (nameEl) nameEl.focus();
Originally posted by @Copilot in malickland-304/wv-property-intelligence#16 (comment)