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

TF-2533 [Part-3] Replace beforeunload with pagehide #2808

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

tddang-linagora
Copy link
Contributor

Issue

Demo

Before

Screen.Recording.2024-04-16.at.15.26.24.mov

After

Screen.Recording.2024-04-16.at.15.18.15.mov

Copy link
Member

@dab246 dab246 left a comment

Choose a reason for hiding this comment

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

Why we need change it?. Please test on different browsers (Chrome/Safari/Firefox/Edge) to see if there is any difference?

@tddang-linagora
Copy link
Contributor Author

Why we need change it?. Please test on different browsers (Chrome/Safari/Firefox/Edge) to see if there is any difference?

beforeunload is unrealiable, and pagehide is perform better in the same regard that we need a way to detect unload event from js

@dab246
Copy link
Member

dab246 commented Apr 16, 2024

Why we need change it?. Please test on different browsers (Chrome/Safari/Firefox/Edge) to see if there is any difference?

beforeunload is unrealiable, and pagehide is perform better in the same regard that we need a way to detect unload event from js

Is there any official documentation about this?

@tddang-linagora
Copy link
Contributor Author

Why we need change it?. Please test on different browsers (Chrome/Safari/Firefox/Edge) to see if there is any difference?

beforeunload is unrealiable, and pagehide is perform better in the same regard that we need a way to detect unload event from js

Is there any official documentation about this?

https://developer.chrome.com/docs/web-platform/page-lifecycle-api#the_unload_event

@dab246
Copy link
Member

dab246 commented Apr 17, 2024

Also change it in HtmlContentViewerOnWeb class in email view

Screenshot 2024-04-17 at 12 13 40

@tddang-linagora
Copy link
Contributor Author

Also change it in HtmlContentViewerOnWeb class in email view

Screenshot 2024-04-17 at 12 13 40

Done

Copy link

This PR has been deployed to https://linagora.github.io/tmail-flutter/2808.

@hoangdat
Copy link
Member

Quite good at replying big email

image

@hoangdat
Copy link
Member

  • Rare time it is still not stable, I think maybe the pagehide listener still not stable
Screenshot 2024-04-25 at 16 31 20

@hoangdat hoangdat changed the base branch from v0.11.3-patch4-dev to master April 25, 2024 09:33
@hoangdat hoangdat merged commit bcc9bb0 into master Apr 25, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants