Skip to content

Floating comment button stops working for non-editors #2257

Closed

Description

@jmfieldman

Describe the bug
The comment button in the formatting toolbar stop appearing when the BlockNoteView editable state becomes false.

To Reproduce
You can reproduce this in the latest stackblitz from your demo: https://stackblitz.com/github/TypeCellOS/BlockNote/tree/main/examples/07-collaboration/06-comments-with-sidebar?file=src%2FApp.tsx

  • The user starts as an editor.
  • Highlight text and see the floating bar.
  • Switch to a commenter user
  • Highlight text, and you will not see any floating buttons (what I expect: still see the comment button)

Now, edit App.tsx and change

const [activeUser, setActiveUser] = useState<MyUserType>(HARDCODED_USERS[0]);

to

const [activeUser, setActiveUser] = useState<MyUserType>(HARDCODED_USERS[2]);

So that it starts with a commenter user.

Reload the page

After reloading, the initial commenter user DOES see the add comment button when highlighting text. If you switch to an editor user and back to a commenter, the add comment button does not appear again.

Expected Behavior

The add comment button is always visible to all users even if the editable state is false.

Misc

This may be affected by reactStrictMode -- when I set it to false in my config this issue springs up more often. Setting it to true fixes the issue in some of my own cases.

Activity

  1. added
    needs-triageIssue has not yet been reviewed or classified by maintainers.
    on Feb 5, 2026
  2. YousefED commented on Feb 25, 2026

    @YousefED
    Collaborator

    I think in the current version, the comment button is visible when switching to editor. However, the first click on the button after switching to commenter doesn't seem to work correctly. Can be reproduced here; https://playground.blocknotejs.org/collaboration/comments

  3. added
    bug:P2High: Core functionality significantly impacted.
    and removed
    needs-triageIssue has not yet been reviewed or classified by maintainers.
    on Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug:P2High: Core functionality significantly impacted.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions