[gpu] Treat empty text as cancel in text modal

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Behdad EsfahbodandClaude Opus 4.6 committed 2026-03-29 23:29:53 -06:00
1 parent ed91b9645f
commit 02edb7ba46
1 file changed
+2 -1
+2 -1
View File
@@ -297,7 +297,8 @@ space: animate · b: dark mode · g: gamma · s: stem · d: debug · r: reset</s
});
document.getElementById('text-apply').addEventListener('click', function () {
var text = textArea.value;
var text = textArea.value.trim();
if (!text) { textModal.style.display = 'none'; return; }
var len = lengthBytesUTF8(text) + 1;
var buf = _malloc(len);
stringToUTF8(text, buf, len);