You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The useBeforeUnload hook takes two params:
enabled: boolean | (() => boolean) = true
message: A string to be displayed in the dialog
The problem is that modern browsers do NOT allow a custom message on the dialog that is shown a result of beforeUnload event, making the second parameter irrelevant.
Describe the solution you'd like
Remove the message parameter and default its value to true for legacy browsers. I understand this would be a breaking change, and less desired.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
An alternative is to just update the documentation to indicate message would only be used as a truthy value for event.returnType and its effect will only apply in legacy browsers. Modern browsers will not use the message provided to be displayed in the dialog.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The
useBeforeUnload
hook takes two params:enabled: boolean | (() => boolean) = true
message
: A string to be displayed in the dialogThe problem is that modern browsers do NOT allow a custom message on the dialog that is shown a result of beforeUnload event, making the second parameter irrelevant.
Describe the solution you'd like
Remove the
message
parameter and default its value totrue
for legacy browsers. I understand this would be a breaking change, and less desired.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
An alternative is to just update the documentation to indicate
message
would only be used as a truthy value forevent.returnType
and its effect will only apply in legacy browsers. Modern browsers will not use the message provided to be displayed in the dialog.The text was updated successfully, but these errors were encountered: