Base ExtJS fiddle

by chrisramakers

HTML

<link rel="stylesheet" href="http://dev.sencha.com/deploy/dev/resources/css/ext-all.css">
<script src="http://dev.sencha.com/deploy/dev/adapter/ext/ext-base.js"></script>
<script src="http://dev.sencha.com/deploy/dev/ext-all.js"></script>
<link rel="stylesheet" href="http://dev.sencha.com/deploy/dev/examples/shared/examples.css">
<p>Textarea resizing test<br/>
    http://stackoverflow.com/questions/5269559/change-textbox-to-textarea-on-click</p>

CSS

body { padding: 20px }

JavaScript

Ext.onReady(function(){
    
    new Ext.form.TextArea({
        renderTo: Ext.getBody(),
        name: 'myTextArea',
        width: 300,
        height: 22,
        listeners: {
            focus: function(textarea){
                textarea.getEl().shift({ height: 150 });
            },
            blur: function(textarea){
                textarea.getEl().shift({ height: 22 });
            }
        }
    });
    
});