View Full Version : Form item lost focus in popup when mouseout

4 Aug 2013, 12:26 PM
Hi - I'm using ExtJS SDK 4.1. I'm facing the following issue:

using Ext.widget(widg) to create and open (show) a popup window
the widg is defined with modal: true configuration
one of widg's items is a form with several fields (not sure if important - fields are dynamically created and each time the form might contain different number of fields)
the issue: when I move the mouse out of the form's area (the mouse might even stays inside the popup area), the filed that was on focus looses the focus. Happens 100% of the times.
Thanks, Charlie

6 Aug 2013, 4:10 PM
I haven't been able to reproduce your issue in 4.2.1 using the below test case. Can you modify it to reproduce the issue or perhaps provide your own test case?

var form = Ext.create('Ext.form.Panel', {
title: 'Simple Form',
bodyPadding: 5,

// The form will submit an AJAX request to this URL when submitted
url: 'save-form.php',

// Fields will be arranged vertically, stretched to full width
layout: 'anchor',
defaults: {
anchor: '100%'

// The fields
defaultType: 'textfield',
items: [{
fieldLabel: 'First Name',
name: 'first',
allowBlank: false
fieldLabel: 'Last Name',
name: 'last',
allowBlank: false

// Reset and Submit buttons
buttons: [{
text: 'Reset',
handler: function() {
}, {
text: 'Submit',
formBind: true, //only enabled once the form is valid
disabled: true,
handler: function() {
var form = this.up('form').getForm();
if (form.isValid()) {
success: function(form, action) {
Ext.Msg.alert('Success', action.result.msg);
failure: function(form, action) {
Ext.Msg.alert('Failed', action.result.msg);

Ext.create('Ext.window.Window', {
title: 'Hello',
width: 400,
layout: 'fit',
items: [form],
modal: true,
defaultFocus: 'textfield'