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

custom handlers initialized multiple times in production #681

Open
addlistener opened this issue Jul 23, 2024 · 0 comments
Open

custom handlers initialized multiple times in production #681

addlistener opened this issue Jul 23, 2024 · 0 comments

Comments

@addlistener
Copy link

addlistener commented Jul 23, 2024

Describe the bug

When process.env.NODE_ENV === "production", which is not desired and will cause not able to drop because of positioner === null
image

When process.env.NODE_ENV === "development", only one get's initialized which is desired
image

To Reproduce

    <Editor
      handlers={(store) => {
        const instance = new CustomEventHandlers({
          store,
          removeHoverOnMouseleave: false,
          isMultiSelectEnabled: (e: MouseEvent) => !!e.metaKey,
        });

        // @ts-ignore
        instance.AAA = getRandomHtmlId();

        console.log('new CustomEventHandlers', instance);
        return instance;
      }}
   ....

Working on providing more details. I need more time

image
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

1 participant