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

Link Bubble Menu keeps appearing intermittently, even when there is no link #318

Open
kartikmandhan opened this issue Jan 29, 2025 · 1 comment

Comments

@kartikmandhan
Copy link

Describe the bug

Link Bubble Menu keeps appearing intermittently, even when there is no link

Image

  • mui-tiptap version: "1.9.5",

  • tiptap version: "2.0.4"

  • @mui/material: [e.g. 6.0.0]

  • @mui/icons-material version: [e.g. 6.0.0]
    Browser: All
    Node version: 16.4.2
    OS: Ubuntu
    Copy-paste your extensions array used for the editor:

  <MenuDivider />

  <MenuSelectHeading
    MenuProps={{
      container: containerEl,
    }}
  />

  <MenuDivider />

  <MenuSelectFontSize
    MenuProps={{
      container: containerEl,
    }}
  />

  <MenuDivider />

  <MenuButtonBold />

  <MenuButtonItalic />

  <MenuButtonUnderline />

  <MenuButtonStrikethrough />

  <MenuButtonSubscript />

  <MenuButtonSuperscript />

  <MenuDivider />

  <MenuButtonTextColor
    PopperProps={{
      container: containerEl,
    }}
    defaultTextColor={theme.palette.text.primary}
    swatchColors={[
      { value: "#000000", label: "Black" },
      { value: "#ffffff", label: "White" },
      { value: "#888888", label: "Grey" },
      { value: "#ff0000", label: "Red" },
      { value: "#ff9900", label: "Orange" },
      { value: "#ffff00", label: "Yellow" },
      { value: "#00d000", label: "Green" },
      { value: "#0000ff", label: "Blue" },
    ]}
  />

  <MenuButtonHighlightColor
    PopperProps={{
      container: containerEl,
    }}
    swatchColors={[
      { value: "#595959", label: "Dark grey" },
      { value: "#dddddd", label: "Light grey" },
      { value: "#ffa6a6", label: "Light red" },
      { value: "#ffd699", label: "Light orange" },
      // Plain yellow matches the browser default `mark` like when using Cmd+Shift+H
      { value: "#ffff00", label: "Yellow" },
      { value: "#99cc99", label: "Light green" },
      { value: "#90c6ff", label: "Light blue" },
      { value: "#8085e9", label: "Light purple" },
    ]}
  />

  <MenuDivider />

  <MenuButtonEditLink />

  <MenuDivider />

  <MenuSelectTextAlign
    MenuProps={{
      container: containerEl,
    }}
  />

  <MenuDivider />

  <MenuButtonOrderedList />

  <MenuButtonBulletedList />

  <MenuButtonTaskList />

  {/* On touch devices, we'll show indent/unindent buttons, since they're
  unlikely to have a keyboard that will allow for using Tab/Shift+Tab. These
  buttons probably aren't necessary for keyboard users and would add extra
  clutter. */}
  {isTouchDevice() && (
    <>
      <MenuButtonIndent />

      <MenuButtonUnindent />
    </>
  )}

  <MenuDivider />

  <MenuButtonBlockquote />

  <MenuDivider />

  <MenuButtonCode />

  <MenuButtonCodeBlock />

  <MenuDivider />

  <MenuButtonImageUpload
    onUploadFiles={(files) =>
      // For the sake of a demo, we don't have a server to upload the files
      // to, so we'll instead convert each one to a local "temporary" object
      // URL. This will not persist properly in a production setting. You
      // should instead upload the image files to your server, or perhaps
      // convert the images to bas64 if you would like to encode the image
      // data directly into the editor content, though that can make the
      // editor content very large.
      files.map((file) => ({
        src: URL.createObjectURL(file),
        alt: file.name,
      }))
    }
  />

  <MenuDivider />

  <MenuButtonHorizontalRule />

  <MenuButtonAddTable />

  <MenuDivider />

  <MenuButtonRemoveFormatting />

  <MenuDivider />

  <MenuButtonUndo />
  <MenuButtonRedo />
</MenuControlsContainer>```tsx


@sjdemartini
Copy link
Owner

Do you have steps to reproduce this issue?

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

No branches or pull requests

2 participants