Skip to content

fix(files): Reset drop notice on firefox - #47465

Merged
susnux merged 2 commits into
masterfrom
fix/files-drop-notice
Aug 26, 2024
Merged

fix(files): Reset drop notice on firefox#47465
susnux merged 2 commits into
masterfrom
fix/files-drop-notice

Conversation

@susnux

@susnuxsusnux commented Aug 24, 2024

Copy link
Copy Markdown
Contributor

Summary

On Firefox there is an old bug where when you move a dragged file outside the window the dragleave event is never emitted. So we just use a timeout to reset the drag over state.

Also a small change: Use the ID of the main container instead of relying on tag name and class. (The ID is guaranteed as other APIs rely on it, while the class is just used internally).

Screen recording

This is how the bug looks (before this PR):

Bildschirmaufnahme_20240824_120143.webm

Checklist

@susnuxsusnux modified the milestones: Nextcloud 30, Nextcloud 31Aug 24, 2024
@susnux
susnux marked this pull request as ready for review August 24, 2024 10:04
@susnux
susnux requested a review from skjnldsv as a code ownerAugust 24, 2024 10:04
@susnux
susnux requested review from Pytal, artonge and nfebeAugust 24, 2024 10:04
@susnux

Copy link
Copy Markdown
ContributorAuthor

Firefox bugs that cause this:

  1. https://bugzilla.mozilla.org/show_bug.cgi?id=1427644
  2. https://bugzilla.mozilla.org/show_bug.cgi?id=656164

And yes those are open since Firefox 4(!)

@susnuxsusnux added the design Design, UI, UX, etc. label Aug 24, 2024
@susnux

Copy link
Copy Markdown
ContributorAuthor

/backport to stable30

@susnux

Copy link
Copy Markdown
ContributorAuthor

/backport to stable29

Comment threadapps/files/src/components/DragAndDropNotice.vue
Comment threadapps/files/src/components/DragAndDropNotice.vue
Comment threadapps/files/src/components/DragAndDropNotice.vue Outdated
Comment threadapps/files/src/components/DragAndDropNotice.vue
@susnux
susnuxforce-pushed the fix/files-drop-notice branch from 7ef9bb6 to f3a2d3bCompareAugust 26, 2024 11:47
@susnux
susnux requested a review from artongeAugust 26, 2024 11:50
@susnux
susnuxforce-pushed the fix/files-drop-notice branch from f3a2d3b to 98d5d86CompareAugust 26, 2024 11:50
@susnux

Copy link
Copy Markdown
ContributorAuthor

/compile

Comment threadapps/files/src/components/DragAndDropNotice.vue Outdated
Comment threadapps/files/src/components/DragAndDropNotice.vue
@susnux

susnux commented Aug 26, 2024

Copy link
Copy Markdown
ContributorAuthor

BTW not sure if this has side effects, but to prevent them if they exist I do not like
delete this.$route.query.XY but prefer creating a copy first so we do not trigger side effects until the $router.push.

@susnux
susnuxforce-pushed the fix/files-drop-notice branch from 506deec to a86ce67CompareAugust 26, 2024 14:42
@susnux

Copy link
Copy Markdown
ContributorAuthor

/compile amend/

susnuxand others added 2 commits August 26, 2024 20:31
On firefox there is an old bug where when you move a dragged file outside
the window the `dragleave` event is never emitted.
So we just use a timeout to reset the drag over state.
Also a small change: Use the ID of the main container instead of relying on tag name and class.
(The ID is guranteed as other APIs rely on it, while the class is just used internally).
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@skjnldsv

Copy link
Copy Markdown
Member

/backport to stable28

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbugdesignDesign, UI, UX, etc.feature: files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@susnux@skjnldsv@artonge@nextcloud-command