Relative Content

Tag Archive for reactjswebnext.js

how to prevent user to escape full screen in next js

I am using version 14 of Next.js, and I want to write code for a scenario where when a user clicks the start button, it goes into full screen. Now, when the user presses Escape for the first time, they should receive a warning saying ‘Are you sure you want to exit full view?’ If the user presses Escape again, then the screen should exit. I wrote some code with the help of ChatGPT, but it’s not working at all. Can anyone help me rewrite this code?