[GH-ISSUE #1145] Reload code editor when opening and closing the comments tab #468

Open
opened 2026-03-03 00:21:24 +03:00 by kerem · 1 comment
Owner

Originally created by @Rokt33r on GitHub (Sep 7, 2021).
Original GitHub issue: https://github.com/BoostIO/BoostNote-App/issues/1145

Issuehunt badges

Current behavior

The cursor position of the editor is broken after opening or closing the comments tab.

How to fix

  • Refresh codemirror after opening/closing the comments tab. Executing editorRef.current.refresh() in cloud/components/Editor/index.tsx should be enough.

Codemirror is emulating cursor position based on its container size. But it cannot detect size changes of the container. So we need to refresh it manually.


IssueHunt Summary

Backers (Total: $20.00)

Become a backer now!

Or submit a pull request to get the deposits!

Tips

Originally created by @Rokt33r on GitHub (Sep 7, 2021). Original GitHub issue: https://github.com/BoostIO/BoostNote-App/issues/1145 <!-- Issuehunt Badges --> [<img alt="Issuehunt badges" src="https://img.shields.io/badge/IssueHunt-%2420%20Funded-%2300A156.svg" />](https://issuehunt.io/r/BoostIO/BoostNote-App/issues/1145) <!-- /Issuehunt Badges --> # Current behavior The cursor position of the editor is broken after opening or closing the comments tab. # How to fix - Refresh codemirror after opening/closing the comments tab. Executing `editorRef.current.refresh()` in `cloud/components/Editor/index.tsx` should be enough. Codemirror is emulating cursor position based on its container size. But it cannot detect size changes of the container. So we need to refresh it manually. <!-- Issuehunt content --> --- <details> <summary> <b>IssueHunt Summary</b> </summary> ### Backers (Total: $20.00) - [<img src='https://avatars3.githubusercontent.com/u/13612118?v=4' alt='boostio' width=24 height=24> boostio](https://issuehunt.io/u/boostio) ($20.00) #### [Become a backer now!](https://issuehunt.io/r/BoostIO/BoostNote-App/issues/1145) #### [Or submit a pull request to get the deposits!](https://issuehunt.io/r/BoostIO/BoostNote-App/issues/1145) ### Tips - Checkout the [Issuehunt explorer](https://issuehunt.io/r/BoostIO/BoostNote-App/) to discover more funded issues. - Need some help from other developers? [Add your repositories](https://issuehunt.io/r/new) on IssueHunt to raise funds. </details> <!-- /Issuehunt content-->
Author
Owner

@issuehunt-oss[bot] commented on GitHub (Sep 14, 2021):

@boostio has funded $20.00 to this issue.


<!-- gh-comment-id:918954820 --> @issuehunt-oss[bot] commented on GitHub (Sep 14, 2021): [@boostio](https://issuehunt.io/u/boostio) has funded $20.00 to this issue. --- - Submit pull request via [IssueHunt](https://issuehunt.io/repos/74213528/issues/1145) to receive this reward. - Want to contribute? Chip in to this issue via [IssueHunt](https://issuehunt.io/repos/74213528/issues/1145). - Checkout the [IssueHunt Issue Explorer](https://issuehunt.io/issues) to see more funded issues. - Need help from developers? [Add your repository](https://issuehunt.io/r/new) on IssueHunt to raise funds.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/BoostNote-App#468
No description provided.