How to restrict browser refresh functionality for POS?

In case a user accidentally clicks on refresh on the browser or presses f5 during the POS session. The entire selected items from the POS transaction go away and the user has to add all the items again.

Or Is there any option to run POS in kiosk mode?

Can we put a password or validation on the browser refresh activity in Point of Sale; similar to the option that appears once someone’s session is logged out and ERPNext asks for the password to log in?

Any help would be much appreciated.

It is not possible in the core but should be able to customize.

Just informing the user our asking for an input before actually refreshing should do the job instead of asking for password.

Can you explain a bit more on this? I tried several methods but had no luck. Especially because Point of Sale is a page and not a doctype.