Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

fix(keyboard): use rune count for threshold check

Datab134c0737fbc
diff --git a/internal/bridge/action_text.go b/internal/bridge/action_text.go
index 74ac165e..c319d8ea 100644
--- a/internal/bridge/action_text.go
+++ b/internal/bridge/action_text.go
@@ -82,7 +82,8 @@ func (b *Bridge) actionKeyboardType(ctx context.Context, req ActionRequest) (map
// For long strings, use insertText to avoid timeout (issue #413).
// We still fire a keydown at the start and keyup at the end to trigger
// any key-event listeners that apps might depend on.
- if len(req.Text) > keyboardTypeThreshold {
+ // Use rune count (not byte length) since we're counting keystrokes.
+ if len([]rune(req.Text)) > keyboardTypeThreshold {
return b.keyboardTypeBatched(ctx, req.Text)
}