Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

407
Views
Detect exit from application in browser Vuejs

I am trying to implement a warning right before user exits the application. It's not on browser closing or tab closing. I want to implement this when user keep tapping on back button until app is about to exit. Please let me know how to do this. I am using Vue2 with composition api plugin. Highly appreciate your help. Thanks !

I already tried below in App.vue. Didn't work

 setup() {
        window.onbeforeunload = function () {
            confirm('Are you sure you want to close the window?')
        }

       
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!