From 1cf64c3e43b1bdc2b6443fd24db8028f3c96c6da Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 27 Feb 2026 18:29:34 +0200 Subject: flamegraph: test pause/keyboard live interactions --- internal/flamegraph/livehtml.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'internal/flamegraph/livehtml.go') diff --git a/internal/flamegraph/livehtml.go b/internal/flamegraph/livehtml.go index b2ea36a..9531f85 100644 --- a/internal/flamegraph/livehtml.go +++ b/internal/flamegraph/livehtml.go @@ -554,7 +554,21 @@ const liveHTML = ` }; } + function fgIsTextEntryTarget(target) { + if (!target) { + return false; + } + if (target.isContentEditable) { + return true; + } + var tag = (target.tagName || '').toUpperCase(); + return tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT'; + } + function fgHandleKeydown(ev) { + if (fgIsTextEntryTarget(ev.target)) { + return; + } if (ev.key === ' ' || ev.code === 'Space') { ev.preventDefault(); fgTogglePause(); -- cgit v1.2.3