Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7586299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:23:36+00:00 2026-05-30T19:23:36+00:00

I am stuck with one problem with one problem in stop the window from

  • 0

I am stuck with one problem with one problem in stop the window from closing using ESC button.

The window gets closed as soon as I click the ESC button from my keyboard. I want the window should not close, instead it should prompt a message box asking ‘YOU REALLY WANTS TO close’ with two button yes or cancel

If person click yes button the the window should destroy and else the window should be as it is.

but don’t know why the window is getting close on ESC press.

I am prompting message as the user click the esc button using below code

listeners: {
        show : function(win) {
          Ext.create('Ext.util.KeyNav', win.getEl(), {
            "esc" : function(e){
              alert('hi.. closing');
              win.hide();
            },
            scope: win
          });
        }
      }

now I want the message box to be appeared and based on the person answer things to be happend.
any help ??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T19:23:37+00:00Added an answer on May 30, 2026 at 7:23 pm

    There is very convenient onEsc function in window‘s config. Use it this way:

    onEsc: function() {
        var me = this;
        Ext.Msg.confirm(
            'Closing confirmation',
            'YOU REALLY WANTS TO close',
            function(btn) {
                if (btn === 'yes')
                    me.hide();
            }
         );
    },
    

    Here is live example.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've stuck with one quite tricky problem. I have list of products from different
I'm kind of stuck on a problem of how to stop my menu from
I am stuck in between of a problem where only one pass of regular
I am stuck up with a problem while using Regular Expression. My requirement is
i am new to hibernate. currently i am stuck in one problem. i have
Hi i am developing android application.Now i stuck in one problem. Let me give
Design problem- one function calls all three I continuation from another question after that
I'm kinda stuck with this one so I hoped someone could help me. I
I'm reading the not so complete pytz documentation and I'm stuck on understand one
I'm stuck for ideas on this one. I'm working on a CMS that uses

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.