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

Avoid text loosing on Chrome browser based if the page is refreshed. #666

Open
PeopleInside opened this issue May 26, 2023 · 2 comments
Open
Labels
Suggestion to add additional features and functionality

Comments

@PeopleInside
Copy link
Contributor

I like the fact UVdesk store what is typed in the ticket field to avoid text loosing on page refresh: this is amazing but seems works well on Firefox but not in Chrome browser based.

I don't know if this is a Chrome BUG or if the code can be improved to work in all browser.
I opened a Chrome BUG here but no solution at the moment.

Will be nice to find a way to prevent text loosing on page refresh also on Chrome.
An idea can be add an alert as happen in this demo: https://wpdiscuz.com/demo/ if you input the text in the comment filed, never submit and try to refresh the page. An alert will inform you the text will be loosed if the page is refreshed.

Will be better store the text also on Chrome but I don't know if this can be done changing something in the code.

The suggestion is to find a way to prevent text loosing on Chrome if input has been made and page is refreshed for some reason before the submit.

@PeopleInside
Copy link
Contributor Author

PeopleInside commented May 30, 2023

I use a custom code for the Forminator Wordpress plugin to avoid that when a user type something in a form and if a page is refreshed, text are loosed.

This script same have the same issue I can find in UVdesk: if user input a text in a field then refresh the page, on Chrome the text is loosed.

The script that I use in Forminator is this one: https://gist.github.com/wpmudev-sls/9917696b87543e3edb92e84f41933be0

I opened a Chrome BUG as mentioned above and I also asked what can be wrong in the code I use in Forminator and a reply from the Google Chrome Project Manager said:

If I read the code correctly, it uses a 'focusout' event listener to save cookie
It should listen to page lifecycle events like 'beforeunload' and 'visibilitychange' instead

https://bugs.chromium.org/p/chromium/issues/detail?id=1439944#c12

As the issue seems happen the same with UVdesk are you using the same method that may be wrong?
I hope you can fix this to work also with Chrome browser based.

If you go on UVdesk form and type some text in a input field then without clicking outside you refresh from a Chrome browser or Edge or Chrominum based browser, the text will be not stored and will be lost. This should be avoided.

@komal-sh-27 komal-sh-27 added the Suggestion to add additional features and functionality label May 31, 2023
@komal-sh-27
Copy link
Contributor

komal-sh-27 commented May 31, 2023

Thanks for the suggestion, we will try to add this suggestion in our uvdesk helpdesk project.

Thanks for your time and patience!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Suggestion to add additional features and functionality
Projects
None yet
Development

No branches or pull requests

2 participants