Results 1 to 2 of 2

Thread: activating Ext.Editor

  1. #1

    Default activating Ext.Editor

    Hello guys,
    I have a problem with Ext.Editor
    I want to active\focus it programmically e.g. I need to put cursor in it and be able to write text in it.
    Here is an example code that does not work:
    Code:
                        this.keyMaps = new Ext.util.KeyMap(this.catPanel.getId(),[{
                            key:'abcdefgijklmnopqrstuvwxyz0123456789',
                            scope:this,
                            fn:function(key,evt){
                                var editor = this.searchEditor.down('#editfield');
                                var val = editor.getValue()+String.fromCharCode(key);                            
                                editor.setValue(val);
                                this.searchEditor.setPosition(coord[0],coord[1],true)
                                this.searchEditor.setVisible(true);
                                editor.focus();
                            }
    searchEditor is defined like this:
    Code:
            this.searchEditor = Ext.create('Ext.panel.Panel',{
                floating:true,
                hidden:true,
                width:150,
                items:[{
                    xtype:'textfield',
                    itemId:'editfield'
                }]
            });
    I've tried many combintions of focus, setActive, etc methods but nothing helped.
    So what can you suggest?

  2. #2

    Default

    Sorry guys,this question is closed.
    It was problem of the chrome debugger.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •