Compare commits

...
Author SHA1 Message Date
shadowdaoandClaude Sonnet 5.5 4f92cfdade Show donate form messages above the PayPal buttons
Test and Release / test (push) Successful in 2m48s
Test and Release / release (push) Successful in 4s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 10:51:44 -08:00
shadowdaoandClaude Sonnet 5.5 fa4feddd35 Fix info tip closing itself when a hover precedes the click
Test and Release / test (push) Successful in 1m13s
Test and Release / release (push) Successful in 6s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 10:45:52 -08:00
+3 -2
View File
@@ -95,7 +95,8 @@
var info = el('button', { type: 'button', 'class': 'sg-info', 'aria-label': T.coverInfoLabel || 'What does this mean?', 'aria-expanded': 'false', 'aria-controls': uid + '-tip', text: 'i' });
var pinnedOpen = false;
function showTip(open) { tip.hidden = !open; info.setAttribute('aria-expanded', String(open)); }
info.addEventListener('click', function () { pinnedOpen = tip.hidden; showTip(pinnedOpen); });
// Click toggles a "pinned" state independent of hover (a tap fires hover first, so reading tip.hidden would undo itself).
info.addEventListener('click', function () { pinnedOpen = !pinnedOpen; showTip(pinnedOpen); });
info.addEventListener('mouseenter', function () { showTip(true); });
info.addEventListener('mouseleave', function () { if (!pinnedOpen) { showTip(false); } });
info.addEventListener('blur', function () { pinnedOpen = false; showTip(false); });
@@ -105,8 +106,8 @@
tip
]));
root.appendChild(row([total]));
root.appendChild(status); // messages sit above the PayPal buttons, next to the form fields
root.appendChild(buttons);
root.appendChild(status);
function say(text, cls) { status.textContent = text || ''; status.className = 'sg-msg' + (cls ? ' ' + cls : ''); }
function amountStr() { return amount.value.trim().replace(',', '.'); }