-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fixes some drag-n-drop problems #1599
Conversation
This bug is present on Chrome on Linux, bit not on Windows |
niveditc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ukrbublik - thank you for submitting this PR.
A few action items:
- This change seems risky without a test plan. Can you either add tests for this code, or add a video to the test plan of the bug & fix?
- Please rebase to master & remove the merge commit + eslint fix from this PR.
- Please remove the commented out code in the commit (
//editor._internalDrag = false;).
94bb7a4 to
57c05cd
Compare
Fixed issue facebookarchive#1454 (partial) Fixed issue facebookarchive#1383
57c05cd to
fd8ca01
Compare
|
Hi @niveditc |
niveditc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good - thanks for fixing the nits & adding a thorough test plan.
|
@ukrbublik, next steps are that:
|
facebook-github-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
niveditc has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: **Summary** Fixes issue facebookarchive#1383. Fixes problem which is: onDrop breaks onSelect/onChange events. Fixes issue facebookarchive#1454 (partial). Fixes problem which is: after first internal drop dragged text will not be moved to target position, but copied. The solution is to set `editor._internalDrag` to false not during onDragOver events, but after end of drag-n-drop. **Test Plan** Attached reproducable videos (on Chrome for Linux) Issue facebookarchive#1383 before and after:   Issue facebookarchive#1454 before and after:   Pull Request resolved: facebookarchive#1599 Differential Revision: D10236073 fbshipit-source-id: 3b7b816630f3b5b15931cb53782a1d5b9e9d5121
Summary: **Summary** Fixes issue facebookarchive#1383. Fixes problem which is: onDrop breaks onSelect/onChange events. Fixes issue facebookarchive#1454 (partial). Fixes problem which is: after first internal drop dragged text will not be moved to target position, but copied. The solution is to set `editor._internalDrag` to false not during onDragOver events, but after end of drag-n-drop. **Test Plan** Attached reproducable videos (on Chrome for Linux) Issue facebookarchive#1383 before and after:   Issue facebookarchive#1454 before and after:   Pull Request resolved: facebookarchive#1599 Differential Revision: D10236073 fbshipit-source-id: 3b7b816630f3b5b15931cb53782a1d5b9e9d5121
Summary: **Summary** Fixes issue #1383. Fixes problem which is: onDrop breaks onSelect/onChange events. Fixes issue #1454 (partial). Fixes problem which is: after first internal drop dragged text will not be moved to target position, but copied. The solution is to set `editor._internalDrag` to false not during onDragOver events, but after end of drag-n-drop. **Test Plan** Attached reproducable videos (on Chrome for Linux) Issue #1383 before and after:   Issue #1454 before and after:   Pull Request resolved: facebookarchive/draft-js#1599 Differential Revision: D10236073 fbshipit-source-id: 3b7b816630f3b5b15931cb53782a1d5b9e9d5121
Summary: **Summary** Fixes issue #1383. Fixes problem which is: onDrop breaks onSelect/onChange events. Fixes issue #1454 (partial). Fixes problem which is: after first internal drop dragged text will not be moved to target position, but copied. The solution is to set `editor._internalDrag` to false not during onDragOver events, but after end of drag-n-drop. **Test Plan** Attached reproducable videos (on Chrome for Linux) Issue #1383 before and after:   Issue #1454 before and after:   Pull Request resolved: facebookarchive/draft-js#1599 Differential Revision: D10236073 fbshipit-source-id: 3b7b816630f3b5b15931cb53782a1d5b9e9d5121
Summary
Fixes issue #1383. Fixes problem which is: onDrop breaks onSelect/onChange events.
Fixes issue #1454 (partial). Fixes problem which is: after first internal drop dragged text will not be moved to target position, but copied.
The solution is to set
editor._internalDragto false not during onDragOver events, but after end of drag-n-drop.Test Plan




Attached reproducable videos (on Chrome for Linux)
Issue #1383 before and after:
Issue #1454 before and after: