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

[Bug]: Content inside Bumble and Floating doesn't react on clicks #4669

Open
1 of 2 tasks
1ncredibleM1nd opened this issue Dec 4, 2023 · 0 comments
Open
1 of 2 tasks
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug

Comments

@1ncredibleM1nd
Copy link

Which packages did you experience the bug in?

"@tiptap/extension-bold": "^2.1.12", "@tiptap/extension-bullet-list": "^2.1.12", "@tiptap/extension-font-family": "^2.1.12", "@tiptap/extension-heading": "^2.1.12", "@tiptap/extension-italic": "^2.1.12", "@tiptap/extension-list-item": "^2.1.12", "@tiptap/extension-ordered-list": "^2.1.12", "@tiptap/extension-strike": "^2.1.12", "@tiptap/extension-text-align": "^2.1.12", "@tiptap/extension-text-style": "^2.1.12", "@tiptap/extension-underline": "^2.1.12", "@tiptap/pm": "^2.1.13", "@tiptap/react": "^2.1.13", "@tiptap/starter-kit": "^2.1.13",

What Tiptap version are you using?

2.1.13

What’s the bug you are facing?

I use Floating and Bumble menu, settings same, but content of Texttoolbar doenst react for clicks and another manipulations

 <FloatingMenu
                editor={editor}
                tippyOptions={{
                    placement: "auto-start",
                    appendTo: module,
                    interactive: true,
                    maxWidth: 500,
                    duration: 100,
                    interactiveDebounce: 150,
                }}
            >
                <TextToolbar editor={editor} />
            </FloatingMenu>

TextToolbar code:
const TextToolbar = ({ editor }: IProps) => {
if (!editor) {
return null;
}

return (
    <div className="toolbar">
        <div className="toolbar__selects">
            <Select className="toolbar__font-styles" width="170px" optionsList={fontStyles} />
            <Select className="toolbar__options-list" width="150px" optionsList={fonts} />
            <Select className="toolbar__fonts-sizes" width="90px" optionsList={fontSizes} />
        </div>
        <div className="toolbar__line toolbar__line_inside">
            <Switcher active={editor.isActive("bold")}>
                <Icon
                    name="text__bold"
                    width={25}
                    height={25}
                    onClick={() => editor.chain().focus().toggleBold().run()}
                />
            </Switcher>
            <Switcher active={editor.isActive("italic")}>
                <Icon name="text__cursive" width={25} height={25} onClick={() => editor.commands.toggleItalic()} />
            </Switcher>

            <Switcher active={editor.isActive("underline")}>
                <Icon
                    name="text__underlined"
                    width={25}
                    height={25}
                    onClick={() => editor.chain().focus().toggleUnderline().run()}
                />
            </Switcher>
            <Switcher active={editor.isActive("strike")}>
                <Icon
                    name="text__through"
                    width={25}
                    height={25}
                    onClick={() => editor.chain().focus().toggleStrike().run()}
                />
            </Switcher>
            <div className="toolbar__divider"></div>
            <Switcher active={editor.isActive("bulletList")}>
                <Icon
                    name="item__list"
                    width={25}
                    height={25}
                    onClick={() => editor.chain().focus().toggleBulletList().run()}
                />
            </Switcher>
            <Switcher active={editor.isActive("orderedList")}>
                <Icon
                    name="numeric__list"
                    width={25}
                    height={25}
                    onClick={() => editor.chain().focus().toggleOrderedList().run()}
                />
            </Switcher>

            <div className="toolbar__divider"></div>
            <Switcher active={editor.isActive({ textAlign: "left" })}>
                <Icon
                    name="align-left"
                    width={25}
                    height={25}
                    onClick={() => editor.chain().focus().setTextAlign("left").run()}
                />
            </Switcher>
            <Switcher active={editor.isActive({ textAlign: "center" })}>
                <Icon
                    name="align-center"
                    width={25}
                    height={25}
                    onClick={() => editor.chain().focus().setTextAlign("center").run()}
                />
            </Switcher>
            <Switcher active={editor.isActive({ textAlign: "right" })}>
                <Icon
                    name="align-right"
                    width={25}
                    height={25}
                    onClick={() => editor.chain().focus().setTextAlign("right").run()}
                />
            </Switcher>
            <Switcher active={editor.isActive({ textAlign: "justify" })}>
                <Icon
                    name="align-fullwidth"
                    width={25}
                    height={25}
                    onClick={() => editor.chain().focus().setTextAlign("justify").run()}
                />
            </Switcher>
        </div>
    </div>
);

};
If i change TextToolbar to button tag nothing changes, no reaction

What browser are you using?

Chrome

Code example

No response

What did you expect to happen?

I expect that when i take my content to Bumble menu it will be react for my clicks.

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. 💖
@1ncredibleM1nd 1ncredibleM1nd added Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug labels Dec 4, 2023
@github-project-automation github-project-automation bot moved this to Triage open in Tiptap Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug
Projects
No open projects
Status: Triage open
Development

No branches or pull requests

3 participants