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

Paste and Match Style / Paste without Formatting is not properly handed by Slate #3414

Open
Killavus opened this issue Jan 9, 2020 · 1 comment · May be fixed by #3415
Open

Paste and Match Style / Paste without Formatting is not properly handed by Slate #3414

Killavus opened this issue Jan 9, 2020 · 1 comment · May be fixed by #3415
Labels

Comments

@Killavus
Copy link

@Killavus Killavus commented Jan 9, 2020

Do you want to request a feature or report a bug?

Report a bug.

What's the current behavior?

Right now if you try to use Paste without Formatting (a.k.a. Patch and Match Style) in Slate it results in a successful paste of content which is not managed by Slate - you can either not remove it, or it gets removed entirely when you start typing anything (browser-dependent). This is caused by lack of beforeinput event when using this option.

Here is the bug in action: https://v.usetapes.com/gXVeb5sv64

Browsers: macOS Chrome, macOS Firefox, macOS Safari. I'm pretty sure all supported browsers are exhibiting this behaviour.
Slate version: 0.57.1

What's the expected behavior?

Paste without Formatting / Paste and Match Style pastes proper text nodes that can be edited by users.

I've created a pull request solving this issue. Since beforeinput is not emitted for these events, they need to be handled in onPaste - paste event is properly emitted for these types of pastes.

@Killavus

This comment has been minimized.

Copy link
Author

@Killavus Killavus commented Jan 13, 2020

@ianstormtaylor do you need more details before you review the PR attached to this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.