Fix
Template tests / tests (push) Failing after 4m1s

This commit is contained in:
2026-07-07 12:04:08 -05:00
parent a7d398ad6a
commit 9555db9bf5
7 changed files with 163 additions and 22 deletions
+11 -1
View File
@@ -169,7 +169,14 @@ function makeHotkeyInput(value = '') {
return wrap;
}
async function promptText({ title, label = 'Value', value = '', placeholder = '', multiline = false } = {}) {
async function promptText({
title,
label = 'Value',
value = '',
placeholder = '',
multiline = false,
onInput = null,
} = {}) {
return new Promise((resolve) => {
const field = multiline
? el('textarea', { rows: 6, placeholder }, value)
@@ -197,6 +204,9 @@ async function promptText({ title, label = 'Value', value = '', placeholder = ''
resolve(field.value);
}
});
field.addEventListener('input', () => {
if (typeof onInput === 'function') onInput(field.value);
});
setTimeout(() => field.focus(), 0);
});