JSFiddle - React, Tailwind, and code Playground
by YangHax
HTML
<link rel="stylesheet" href="http://dev.sencha.com/deploy/ext-4.0.2a/resources/css/ext-all.css">
JavaScript
// ExtJS 4 - Window with form not stretched on inputs with msgTarget: under
//**************************//
Ext.onReady(function(){
var createWindow = function() {
return Ext.create('Ext.Window',{
title: 'Login'
, id: 'myid'
, closable: true
, resizable: false
, items:
[
{
xtype: 'form'
, width: 350
, layout: 'anchor'
, defaults: { anchor: '100%', labelWidth: 60 }
, items:
[
{ xtype: 'label', html: '<h2>It appears you are no longer logged in!</h2>' }
, { xtype: 'label', html: 'Please re-enter your credentials:' }
, { xtype: 'textfield', name: 'username', fieldLabel: 'Username', value: 'Test', readOnly: true }
, {
xtype: 'textfield'
, inputType: 'password'
, name: 'password'
, fieldLabel: 'Password'
, enableKeyEvents: true
, allowBlank: false
, msgTarget: 'under'
}
, {
xtype: 'container'
, layout: 'hbox'
, items:
[
{ xtype: 'component', flex: 1 }
, { xtype: 'button', type: 'submit', iconCls: 'icon-key', text: 'Login', name: 'submit', handler: function(){
this.up('window').destroy();
setTimeout(function(){createWindow();},3000);
...