Hybrid View

  1. #1
    Ext User zhegwood's Avatar
    Join Date
    Dec 2007
    Location
    Boulder, CO Suburbia (Lafayette)
    Posts
    388
    Vote Rating
    1
    zhegwood is on a distinguished road

      0  

    Default [workaround] Is there a way to specify a tabIndex in the HtmlEditor?

    [workaround] Is there a way to specify a tabIndex in the HtmlEditor?


    Setting the tabIndex in the config doesn't do anything, but I thought I'd give it a try. Also, setting the tabindex attribute on the textarea on render isn't working either. Anyone have ideas? Do I have to listen for the tab key and focus the iframe? Here's what I have so far:

    Code:
    		this.htmlEditorComments = new Ext.form.HtmlEditor({
    			fieldLabel:'Comment',
    			name: 'entry_html',
    			hideMode: 'display',
    			tabIndex: 13,
    			autoMonitorDesignMode: false,
    			width: 575,
    			height: 70
    		});
    		this.htmlEditorComments.on("render",function(editor){
    			var wrap = Ext.get(editor.el.dom.parentNode)
    			var tbar = wrap.select('.x-html-editor-tb');
    			var textarea = wrap.select('.x-form-textarea').elements[0];
    			textarea.setAttribute('tabindex',13);
    //			console.log(textarea);
    			tbar.elements[0].style.display = "none";
    		},this);

  2. #2
    Ext User zhegwood's Avatar
    Join Date
    Dec 2007
    Location
    Boulder, CO Suburbia (Lafayette)
    Posts
    388
    Vote Rating
    1
    zhegwood is on a distinguished road

      0  

    Default


    No solutions? Still am not able to get this working.

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    Please don't bump your threads every 4 hours. You'll get an answer if/when someone reads this and has something to say.

  4. #4
    Ext User zhegwood's Avatar
    Join Date
    Dec 2007
    Location
    Boulder, CO Suburbia (Lafayette)
    Posts
    388
    Vote Rating
    1
    zhegwood is on a distinguished road

      0  

    Default


    Workaround...

    on the field before the editor, do this:
    Code:
    	listeners:{
    		blur: function() {
    			var self=this;
    			setTimeout(function(){
    				self.htmlEditorObj.focus()
    			},10);},
    		scope:this
    	}
    The setTimeout has to be there in order for the tab to momentarily focus the next field in the tab order & then the htmlEditor is focused after that's happened. I guess if the HtmlEditor is the first field, you listen for the tab key and focus it that way.

    Would tabIndex not working for the HtmlEditor object be considered a bug?

Thread Participants: 1