Skip to content

[EuiMarkdownEditor] Fix react-dropzone taking over all drop events on the page#5340

Merged
cee-chen merged 2 commits intoelastic:masterfrom
cee-chen:markdown-filepicker-conflict-fix
Nov 1, 2021
Merged

[EuiMarkdownEditor] Fix react-dropzone taking over all drop events on the page#5340
cee-chen merged 2 commits intoelastic:masterfrom
cee-chen:markdown-filepicker-conflict-fix

Conversation

@cee-chen
Copy link
Copy Markdown
Contributor

@cee-chen cee-chen commented Nov 1, 2021

Summary

@brittanyjoiner15 and @i-a-n noticed that EuiFilePickers on the same page as EuiMarkdownEditors did not have functioning drag & drop. This is because react-dropzone (used by EuiMarkdownEditor) intercepts all document drop events, which we have to toggle off via a preventDropOnDocument config.

Before

before

After

after

Checklist

- [ ] Check against all themes for compatibility in both light and dark modes
- [ ] Checked in mobile

  • Checked in Chrome, Safari, Edge, and Firefox

- [ ] Props have proper autodocs and playground toggles
- [ ] Added documentation
- [ ] Checked Code Sandbox works for any docs examples
- [ ] Added or updated jest and cypress tests
- [ ] Checked for breaking changes and labeled appropriately
- [ ] Checked for accessibility including keyboard-only and screenreader modes

  • A changelog entry exists and is marked appropriately

@cee-chen cee-chen added the bug label Nov 1, 2021
@cee-chen cee-chen requested a review from thompsongl November 1, 2021 20:21
Copy link
Copy Markdown
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦑

@cee-chen cee-chen enabled auto-merge (squash) November 1, 2021 20:42
@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_5340/

@cee-chen cee-chen merged commit 1a1b4f0 into elastic:master Nov 1, 2021
@cee-chen cee-chen deleted the markdown-filepicker-conflict-fix branch November 1, 2021 21:09
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

Successfully merging this pull request may close these issues.

3 participants