humhub / mail

A private messaging system for direct communication.
https://marketplace.humhub.com/module/mail
29 stars 50 forks source link

When writing a message, if not yet submitted, add a warning dialog if leaving the page #364

Closed marc-farre closed 11 months ago

marc-farre commented 11 months ago

Situation 1:

  1. Create a new conversation
  2. Write a message but don't submit it
  3. Click on the modal close button

Situation 2:

  1. Write a message (new conversation of replying) but don't submit it
  2. Click on an internal link or refresh the page

Your message is lost. There is no warning dialog.

Usually, when an internal link is clicked, we have a warning dialog: "Unsaved changes will be lost. Do you want to proceed?". https://github.com/humhub/humhub/blob/master/protected/humhub/widgets/CoreJsConfig.php#L50

It should be applied also for the Messenger module.

See also https://github.com/humhub/humhub/issues/6708

yurabakhtin commented 11 months ago

@marc-farre @luke- PR https://github.com/humhub/mail/pull/366.