Skip to content
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

OCIS Web doesn't warn a user about closing a window with an active upload #10500

Closed
prohtex opened this issue Feb 21, 2024 · 3 comments · Fixed by #10519
Closed

OCIS Web doesn't warn a user about closing a window with an active upload #10500

prohtex opened this issue Feb 21, 2024 · 3 comments · Fixed by #10519
Labels
Priority:p3-medium Normal priority Type:Bug Something isn't working

Comments

@prohtex
Copy link

prohtex commented Feb 21, 2024

Describe the bug

OCIS Web doesn't warn a user about closing a window with an active upload

Steps to reproduce

  1. Begin upload
  2. Close Window

Expected behavior

When user closes a browser window with an active upload, an error warns the user about the active upload.

Actual behavior

Window is closed and upload fails

Setup

OCIS latest with Safari browser

@prohtex prohtex added the Type:Bug Something isn't working label Feb 21, 2024
@dschmidt
Copy link
Member

c.f.

const preventUnload = (e) => {
e.preventDefault()
e.returnValue = ''
}
watch(isDirty, (dirty) => {
// Prevent reload if there are changes
if (dirty) {
window.addEventListener('beforeunload', preventUnload)
} else {
window.removeEventListener('beforeunload', preventUnload)
}
})

@kulmann kulmann added the Priority:p3-medium Normal priority label Feb 26, 2024
@kulmann kulmann moved this from Qualification to Prio 3 or less in Infinite Scale Team Board Feb 26, 2024
@kulmann
Copy link
Contributor

kulmann commented Feb 26, 2024

@jacob-nv maybe something for you?

@AlexAndBear
Copy link
Contributor

@kulmann @jacob-nv sorry, I was already on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:p3-medium Normal priority Type:Bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants