Skip to content

fix: remove beforeunload and resize listener when closing composer#13169

Draft
steven-mpawulo wants to merge 2 commits into
nextcloud:mainfrom
steven-mpawulo:fix/13031-confirmation-popup-before-leaving
Draft

fix: remove beforeunload and resize listener when closing composer#13169
steven-mpawulo wants to merge 2 commits into
nextcloud:mainfrom
steven-mpawulo:fix/13031-confirmation-popup-before-leaving

Conversation

@steven-mpawulo

Copy link
Copy Markdown
Collaborator

Removed beforeunload and resize listeners

Fixes #13031

Signed-off-by: steven-mpawulo <stevenmpawulo@gmail.com>
@ChristophWurst

Copy link
Copy Markdown
Member

Thanks for the fix

@ChristophWurst ChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs more refinement. The listeners have to be put back when you start composing the next email.
And saving any draft should be awaited, so the lines have to be pushed down after the if.

@ChristophWurst
ChristophWurst marked this pull request as draft July 1, 2026 13:21
@steven-mpawulo

Copy link
Copy Markdown
Collaborator Author

Ohh,
Let me adjust.

@github-actions

Copy link
Copy Markdown

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@ChristophWurst ChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and after sending an email I still can not reload without the warning.

Which use case does this fix address?

@steven-mpawulo

Copy link
Copy Markdown
Collaborator Author

This PR covers the case from #13031 - closing the composer without sending (draft autosaved) where the beforeunload listener wasn't being removed on close.

@ChristophWurst

Copy link
Copy Markdown
Member

After #13303 the handling should already improve. Should be tested again.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mail app shows a confirmation popup before leaving - beforeunload listener not removed when closing composer

2 participants