Conversation
…gs while dragging an image over the editor.
…te and drop events.
# Conflicts: # packages/ckeditor5-engine/src/view/datatransfer.ts
| const evtData: ClipboardEventData = { | ||
| dataTransfer: new DataTransfer( 'clipboardData' in domEvent ? domEvent.clipboardData! : domEvent.dataTransfer! ) | ||
| dataTransfer: new DataTransfer( | ||
| 'clipboardData' in domEvent ? domEvent.clipboardData! : domEvent.dataTransfer!, |
There was a problem hiding this comment.
I'd extract these expressions. They made it hard for me to parse this code.
|
|
||
| constructor( nativeDataTransfer: DomDataTransfer ) { | ||
| this.files = getFiles( nativeDataTransfer ); | ||
| constructor( nativeDataTransfer: DomDataTransfer, options: { cacheFiles?: boolean } = {} ) { |
There was a problem hiding this comment.
Doesn't the new option need to be documented?
Or it's blocked by the issue about porting API docs to TSDoc?
There was a problem hiding this comment.
It's not blocked.
But, IMO, if the parameter name makes its purpose obvious, do we really need docs every time?
There was a problem hiding this comment.
Second thought. It's not obvious, the cashing happens anyway. It should be called eagerlyGetFiles or lazyGetFiles, cacheItNow or something in this direction.
There was a problem hiding this comment.
I'd say that while the name says what it does. It does not say anything about why you may need that. And that's what the documentation should cover in most cases too.
|
@arkflpc can we merge this PR? |
Fix (clipboard, engine): Dragging images in the editor should not lag in Firefox. Closes #13366.
Suggested merge commit message (convention)
Fix (clipboard, engine): Dragging images in the editor should not lag in Firefox. Closes #13366.
Additional information