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 8411751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:30:16+00:00 2026-06-10T00:30:16+00:00

Using ExtJS 4.1.1 even though in Ext.util.KeyMap i have set the defaultEventAction: ‘preventDefault’ and

  • 0

Using ExtJS 4.1.1 even though in Ext.util.KeyMap i have set the defaultEventAction: ‘preventDefault’ and in the fn : function also i have set the e.preventDefault(); still it opens the new tab in chrome? I just want the field to perform the action fn the keys are implemented for and not the default browser action of opening the new tab. How is this possible?

    Ext.onReady(function () {

    var bcTextField = Ext.create('Ext.form.Text', {
        xtype: 'textfield',
        renderTo: 'console-output',
        emptyText: 'Enter Barcode/Accession Number',
        width: 200,
        margin: '0'
    });
    var map = new Ext.util.KeyMap({
        target: bcTextField.getEl(),
        binding: [{
            key: "t",
            ctrl: true,
            scope: this,
            defaultEventAction: 'preventDefault',
            fn: function (key, e) {
                e.preventDefault();
                alert('Ctrl + t was pressed.');
            }
        }]
    });
});

Any kind of help is appreciated.

  • 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-06-10T00:30:17+00:00Added an answer on June 10, 2026 at 12:30 am

    Check the answer by Omnosis in this thread.. A detailed description about capturing such events is given. Hope it helps.

    javascript capture browser shortcuts (ctrl+t/n/w)

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

Sidebar

Related Questions

Using ExtJS 4.0.2 , I can type the following into the console: Ext.util.Format.date('2012-01-13', m-d-Y);
I am using ExtJS 4. I have created a tree panel as var treeStore
I'm using extjs mvc style to create a web application. I don't have any
I'm using ExtJS 2.2.1 In my web app, I used to have a TreePanel
I'm using ExtJS to create a formPanel: new Ext.FormPanel({ labelAlign: 'top', title: 'Loading Contact...',
// Using extjs 3.x var box = new Ext.Textfield { /* textField configuration */
I'm using ExtJS 3.2 and have content inside of a tab panel, and the
I'm using extjs and just trying to solve a simple problem: I have a
I'm using ExtJS 4.0.7, am new to Ext, and am using the new MVC
I am using ExtJS 3.4 . I have a structure with data for combobox

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.