Repository navigation
Conversation
ellatrix
requested review from
aduth,
ajitbohra,
chrisvanpatten,
gziolo,
jorgefilipecosta,
noisysocks,
talldan and
youknowriad
as code owners
March 22, 2019 13:12
4 tasks
Member
Author
|
I tried to make an e2e test but it didn't work out. |
ellatrix
force-pushed
the
try/rich-text-drag-html
branch
from
April 4, 2019 07:44
5809921 to
3ce88ca
Compare
youknowriad
reviewed
Apr 19, 2019
| // Cancel multi-selection. | ||
| this.props.onSelectionEnd(); | ||
| // Revert to selecting the block if there is multi-selection. | ||
| this.props.onSelect(); |
Contributor
There was a problem hiding this comment.
Should we do these two calls constantly or check if needed (trying to be mindful of rerenders)
youknowriad
reviewed
Apr 19, 2019
| }, value.formats ); | ||
| } | ||
|
|
||
| function extractData( dataTransfer ) { |
Contributor
There was a problem hiding this comment.
Do you think this is unit testable?
youknowriad
self-requested a review
April 19, 2019 08:47
|
I'd love to see this revisited. 👍 |
| const item = find( [ ...items, ...files ], ( { type } ) => /^image\/(?:jpe?g|png|gif)$/.test( type ) ); | ||
| if ( item && ! html ) { | ||
| const file = item.getAsFile ? item.getAsFile() : item; | ||
| const file = find( files, ( { type } ) => /^image\/(?:jpe?g|png|gif)$/.test( type ) ); |
Member
There was a problem hiding this comment.
No need to use Lodash here:
Suggested change
| const file = find( files, ( { type } ) => /^image\/(?:jpe?g|png|gif)$/.test( type ) ); | |
| const file = files.find( ( { type } ) => /^image\/(?:jpe?g|png|gif)$/.test( type ) ); |
Member
There was a problem hiding this comment.
Or if files may be nullish:
Suggested change
| const file = find( files, ( { type } ) => /^image\/(?:jpe?g|png|gif)$/.test( type ) ); | |
| const file = files?.find( ( { type } ) => /^image\/(?:jpe?g|png|gif)$/.test( type ) ); |
ellatrix
requested review from
cameronvoell,
etoledom and
guarani
as code owners
October 1, 2020 09:41
Contributor
|
Looks like this needs to be rebased with |
guarani
removed their request for review
January 19, 2022 12:59
33 of 70 tasks
Member
Author
|
Closing in favor of #81603. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #3339. This one was a bit harder to figure out than I thought.
Currently, it is not possible to drag text at all. Not within the same editable field (rich or plain), not across blocks. This PR allows the user to do so.
How has this been tested?
Select some text, drag it to another rich text area, then drop. Do the same within a rich text area.
Screenshots
Types of changes
Checklist: