openclaw - 💡(How to fix) Fix Browser tool needs a CDP/IME text insertion action for contenteditable editors like X composer [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#54879Fetched 2026-04-08 01:34:53
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

The current browser tool input paths are not sufficient for some contenteditable rich editors (notably X/Twitter composer with Korean text input).

A CDP-backed text insertion action (for example using Chrome DevTools Protocol Input.insertText) would solve a real capability gap.

Root Cause

This is not just an X-specific issue. It affects any site where:

  • text input is mediated by a rich contenteditable editor
  • IME / non-Latin text matters
  • synthetic paste / regular type paths are insufficient
RAW_BUFFERClick to expand / collapse

Summary

The current browser tool input paths are not sufficient for some contenteditable rich editors (notably X/Twitter composer with Korean text input).

A CDP-backed text insertion action (for example using Chrome DevTools Protocol Input.insertText) would solve a real capability gap.

Problem observed

On X composer / contenteditable rich editor:

  • Meta+V paste can fire a paste event but carry empty clipboardData payload through the current automation path
  • regular browser-tool type / fill can be unreliable
  • direct DOM/editor tricks such as execCommand('insertText') can show text, but do not always commit editor state correctly

In contrast, direct CDP Input.insertText testing succeeded:

  • Korean text inserted correctly
  • editor state remained stable after cursor movement
  • Post button became enabled

Expected capability

A browser-tool action that:

  • fits into the existing browser act flow
  • works with existing browser profiles / attached logged-in sessions
  • focuses the target element/tab and inserts text via CDP Input.insertText
  • is suitable for IME/native-text-like insertion in contenteditable rich editors

Potential shape:

  • browser act kind="insertTextIme"
  • or browser act kind="cdpInsertText"

Why this matters

This is not just an X-specific issue. It affects any site where:

  • text input is mediated by a rich contenteditable editor
  • IME / non-Latin text matters
  • synthetic paste / regular type paths are insufficient

Suggested direction

Add a CDP-backed input action in the browser tool layer, rather than pushing users toward separate external automation stacks.

That keeps the current OpenClaw browser workflow intact while solving the missing capability at the right layer.

extent analysis

Fix Plan

To address the issue, we will implement a new browser tool action that utilizes the Chrome DevTools Protocol (CDP) Input.insertText method. This will enable reliable text insertion in contenteditable rich editors, especially for non-Latin characters.

Steps:

  1. Add a new browser act kind: Introduce a new kind attribute to the browser act flow, e.g., kind="insertTextIme" or kind="cdpInsertText".
  2. Implement CDP-backed input action: Create a new function that focuses the target element/tab and inserts text using the CDP Input.insertText method.
  3. Integrate with existing browser profiles: Ensure the new action works with existing browser profiles and attached logged-in sessions.

Example Code (JavaScript):

// browser-tool.js
async function insertTextIme(text, targetElement) {
  // Focus the target element
  await targetElement.focus();

  // Use CDP to insert text
  await chrome.devtools.input.insertText({ text });
}

// Add new browser act kind
browserActKinds.push('insertTextIme');

// Handle new kind in browser act flow
if (act.kind === 'insertTextIme') {
  const targetElement = await getTargetElement(act);
  await insertTextIme(act.text, targetElement);
}

Verification

To verify the fix, test the new insertTextIme action with various contenteditable rich editors, including the X/Twitter composer with Korean text input. Ensure that:

  • Text is inserted correctly
  • Editor state remains stable after cursor movement
  • Post button becomes enabled

Extra Tips

  • Make sure to handle errors and exceptions properly when using the CDP Input.insertText method.
  • Consider adding additional logging or debugging mechanisms to help diagnose issues with the new action.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING