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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:02:31+00:00 2026-06-05T23:02:31+00:00

I have trivial window: this.window = Ext.widget(‘window’, { title: ‘Find’, closeAction: ‘hide’, width: 300,

  • 0

I have trivial window:

   this.window = Ext.widget('window', {
            title: 'Find',
            closeAction: 'hide',
            width: 300,
            layout: 'fit',
            items: form
        });

with trivial form in it

var form = Ext.widget('form', {
    layout: {
        type: 'vbox',
        align: 'stretch'
    },
    border: false,
    bodyPadding: 10,

    items: [
        this.findInput,
    ]
});

which only has one item

    this.findInput = Ext.widget('textfield', {
        name: 'find'
    });

The issue is: how to set focus right after window is shown? I tried to call .focus() method of this.findInput in almost every window event handler with no luck.

Seems like even afterrender is called synchronously before DOM has created all the elements completely.

What have I missed? What event should I bind to to have all the elements rendered and able to accept the focus?

PS: if I call the same .focus() after small interval like 10ms – I get it focused, but it’s not a solution

  • 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-05T23:02:32+00:00Added an answer on June 5, 2026 at 11:02 pm

    Check out activeItem property – http://docs.sencha.com/ext-js/4-0/#!/api/Ext.form.Panel-cfg-activeItem

    or you can also use defaultFocus: http://docs.sencha.com/ext-js/4-0/#!/api/Ext.window.Window-cfg-defaultFocus

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

Sidebar

Related Questions

This is a very trivial problem but I can't seem to find a way
Pardon me if this question sounds trivial, I don't have any experience working with
This may sound trivial but i have a problem with setting selected item in
I have some json files with 500MB. If I use the "trivial" json.load() to
Have a look at this picture alt text http://www.abbeylegal.com/downloads/2009-04-01/web%20part%20top%20line.jpg Does anyone know what css
I have some trivial JavaScript to effect a style change: sel = document.getElementById('my_id'); sel.className
Has anyone managed to have the correct layout direction (left-to-right and right-to-left) be inferred
This seems like such a trivial question to ask, but it's been vexing me
I have been playing with the Command Window in Visual Studio (View->Other Windows->Command Window).
I have an interesting content layout proposal but I'm having difficulty figuring out how

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.