Wrong cursor position when using Copilot Chat on GitHub

Description of the issue:

On GitHub interface when you use Copilot inline the cursor is in wrong position.

Steps to Reproduce (add as many as necessary): 1. 2. 3.

  1. Sign in to GitHub
  2. Open https://github.com/enockarthur298/initflow-startup/blob/master/app/components/chat/BaseChat.tsx
  3. Open Copilot inline (open the drop-down and pick Assistive)
  4. Type: “Can you tell me if in this project in any file there are React hooks in wrong place”

Actual Result (gifs and screenshots are welcome!):

On the above image, the cursor is at the end, but shows up in the middle of the word.

Expected result:

The cursor should be after the text

Reproduces how often: Always

Operating System and Brave Version(See the About Brave page in the main menu):

Wersja 1.77.97 Chromium: 135.0.7049.84 (Oficjalna wersja) (64-bitowa)

Additional Information::

It works in Google Chrome, doesn’t work on Brave incognito mode.

I believe this is not a real textarea, only a div with text that is aligned with textarea content. But in Brave, the position of the fake textarea and real text are misaligned.