EmerisHQ / demeris

Emeris web app
https://app.emeris.com/
Apache License 2.0
12 stars 2 forks source link

Ask user to confirm before reloading browser during multi-step transaction #1762

Open caudurodev opened 2 years ago

caudurodev commented 2 years ago

Why Suggestion - to avoid operations being interrupted in multi-step flows, it could be helpful to block the users from accidentally reloading the browser by throwing a JavaScript alert that asks them to confirm the action.

What

window.onbeforeunload = function () {
  return 'Transaction is still processing. If you reload you will lose your progress - are you sure?';
 }

All potential multi-step transactions would need to be identified and this alert be added. Could be created as composable.