-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix: drag drop file safari #34406
fix: drag drop file safari #34406
Conversation
@s77rt I created the fixed PR. Can you help check? Thanks |
src/hooks/useDragAndDrop.ts
Outdated
@@ -86,7 +89,7 @@ export default function useDragAndDrop({dropZone, onDrop = () => {}, shouldAllow | |||
return; | |||
} | |||
// This is necessary because dragging over children will cause dragleave to execute on the parent. | |||
if ((event.currentTarget as HTMLElement | null)?.contains(event.relatedTarget as HTMLElement | null)) { | |||
if (enterTarget.current !== event.target){ |
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.
What if the enter target gets removed? I think we are relying on another element to take the enter target role?
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.
I see we still use event.target
in many places. I also tested well. What should we do in this case?
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.
I can't find a particular bug here. Let's go with this
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / Safariweb-chrome.movweb-safari.movMacOS: Desktopdesktop.mov |
We did not find an internal engineer to review this PR, trying to assign a random engineer to #34349 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
@amyevans for review |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.26-2 🚀
|
Details
Fixed Issues
$ #34349
PROPOSAL: NA
Tests
We should test it on web/desktop only
Offline tests
Same as above
QA Steps
We should test it on web/desktop only
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2024-01-12.at.11.20.49.mov
Screen.Recording.2024-01-12.at.11.21.20.mov
MacOS: Desktop
Screen.Recording.2024-01-03.at.15.19.13.mov