This is a followup from
MDL-51257, where the form changed alert was added for the general case of abandoning a message without sending it.
While that general case seemed to work ok, it was detected that some (messaging-centric) operations were still leading to the alert to be missed at the end. Pasting original cases:
But... there are some weird behaviors with all these cases:
A) After introducing a text, you click Preview and from there, you click Update so you're back to the form (and it's filled with the message being edited). At that point the alert is not shown anymore.
B) After introducing a text, remove any of the target users using the "remove xxx" buttons. After a removal the alert is not shown anymore.
C) After introducing a text, click on keep searching. The alert will be correctly shown. Accept and you'll be back to the participants list. Pick some more and select again "send messages". You'll end in the form page, with the new users properly added and the old text recovered. But, at that exact point the alert is not shown anymore.
So, I understand current code fixes the "simple" scenario, but there are others (A, B, C above) where the alert stops working. Not really sure if it's worth fixing all them or they can be delegated to another issue, please discuss it there and any agreed outcome will be accepted.
So this is about to decide when the cases above are worth being considered, if they are a bug or an improvement and how to solve it (if decided to do so).