Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Floating menu shows when editor.isEditable == false #2715

Closed
1 of 2 tasks
nitipit opened this issue Apr 15, 2022 · 8 comments · Fixed by #3195
Closed
1 of 2 tasks

Floating menu shows when editor.isEditable == false #2715

nitipit opened this issue Apr 15, 2022 · 8 comments · Fixed by #3195
Assignees
Labels
Type: Bug The issue or pullrequest is related to a bug

Comments

@nitipit
Copy link

nitipit commented Apr 15, 2022

What’s the bug you are facing?

Floating menu shows when editor.isEditable == false

Which browser was this experienced in? Are any special extensions installed?

Google Chrome v100

How can we reproduce the bug on our side?

Call editor.setEditable(false) then click on empty content, then the floating-menu will show up.

Can you provide a CodeSandbox?

Condition check here in public shouldShow

Should add || !editor.isEditable

if (
    !view.hasFocus()
    || !empty
    || !isRootDepth
    || !isEmptyTextBlock
    || !editor.isEditable  // <- Add this line.
)

What did you expect to happen?

Floating menu should not show when editor.isEditable == false

Anything to add? (optional)

No response

Did you update your dependencies?

  • Yes, I’ve updated my dependencies to use the latest version of all packages.

Are you sponsoring us?

  • Yes, I’m a sponsor. 💖
@nitipit nitipit added the Type: Bug The issue or pullrequest is related to a bug label Apr 15, 2022
@AlonBru
Copy link

AlonBru commented Apr 26, 2022

If you need an urgent fix, try removing the suggestion props, this seems to be rid of the menu

 Mention.configure( {
  HTMLAttributes: {
    class: 'mention',
   },
} )

@stale
Copy link

stale bot commented Jul 6, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 6, 2022
@nitipit
Copy link
Author

nitipit commented Jul 7, 2022

Hi, is anyone here ?
The fixing code I've provided is straight forward, I can make a pull request if the maintainer of the project agree.

@stale stale bot removed the stale label Jul 7, 2022
@github-actions
Copy link
Contributor

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the Info: Stale The issue or pullrequest has not been updated in a while and might be stale label Aug 22, 2022
@bdbch bdbch self-assigned this Aug 22, 2022
@bdbch
Copy link
Member

bdbch commented Aug 22, 2022

Hey @nitipit I'll take a look at this issue asap. Sorry for the long wait time!

@bdbch bdbch added this to the 2.0.0 milestone Aug 22, 2022
@github-actions github-actions bot removed the Info: Stale The issue or pullrequest has not been updated in a while and might be stale label Aug 23, 2022
@nitipit
Copy link
Author

nitipit commented Aug 23, 2022

@bdbch Thanks

@Nicolas-Dolan
Copy link

@bdbch I'm having a great time with tiptap and appreciate all the hardwork you guys have put into it. Unfortunately this fix has broken a feature in my build. Is there now any way to show the bubble menu if you do want to display it while the editor is not editable? Seems like the kind of feature that would be useful in many situations, not just while editing.

@bdbch
Copy link
Member

bdbch commented Dec 7, 2022

@Nicolas-Dolan not really - could you create an issue so we can reimplement this as an option?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug The issue or pullrequest is related to a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants