Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 11, 2025

Revert repository to commit 209e620

Plan:

Changes to revert:

  1. Remove placeCaretAtPosition function (34 lines)
  2. Remove shouldComponentUpdate method from ContentEditable component
  3. Remove componentWillUpdate method from ContentEditable component
  4. Remove componentDidUpdate method from ContentEditable component
Original prompt

revert to 209e620


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

google-labs-jules bot and others added 8 commits July 31, 2025 08:58
The cursor was jumping to the beginning of the comment field during input. This was caused by the `ContentEditable` component re-rendering on every keystroke, which reset the cursor position.

This change introduces the `shouldComponentUpdate` lifecycle method to the `ContentEditable` component. This method prevents the component from re-rendering if the new `html` prop is the same as the component's current inner HTML, which is the case during user input. This ensures that the component does not re-render unnecessarily, preserving the cursor's position.

Both `script.jsx` and the compiled `script.js` have been updated with this change.
Fix: Prevent cursor jump when typing in comments

The cursor was jumping to the beginning of the comment field during input. This was caused by the `ContentEditable` component re-rendering on every keystroke, which reset the cursor position.

This change introduces the `shouldComponentUpdate` lifecycle method to the `ContentEditable` component. This method prevents the component from re-rendering if the new `html` prop is the same as the component's current inner HTML, which is the case during user input. This ensures that the component does not re-render unnecessarily, preserving the cursor's position.

Both `script.jsx` and the compiled `script.js` have been updated with this change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants