Skip to content

blockComponent is recreated when special char is typed in the main editor #384

Open
@ShakurOo

Description

-- Bug Report --

Expected Behavior

The blockComponent shouldn't be re-created all times

Current Behavior

Since the version 0.7.0 the blockComponent is always re-created when you write a special character like ê, ë (combinaison of two keyboard keys to being added).

Steps to Reproduce

Go to : https://codesandbox.io/s/megadraft-with-plugins-and-example-content-forked-ck83pb?file=/src/index.js

  1. Open the console, you see one ImageButton mount ... and ImageBlock mount ...
  2. Type something in the editor you, nothing happened in the console
  3. Now type character ê multiple times and see the console, the ImageBlock component is re-created for each character...
  4. Downgrade the version of megadraft under the 0.7.0, and type the special character, you can see the expected behavior

Browser, device, and OS

Screenshots

Capture d’écran 2022-09-15 à 19 11 28

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions