﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
13193	Dialog tab is disabled if has content elements of html type only	Stevan Koprivica		"In plugins/dialog/plugin.js, there's a bug in a show() method, evaluating if the tab shoud be disabled or not. 

If the element has no input element, iteration never reaches evaluation if the element is required and can pass active content filter check.

If no element in the tab has input element, whole tab is disabled (and I'm sure it's unexpected when I have a tab with one html element in it).

Code excerpt

{{{
enableElements = 0;
for ( var j in this._.contents[ content.id ] ) {
    var elem = this._.contents[ content.id ][ j ];

    if ( elem.type == 'hbox' || elem.type == 'vbox' || !elem.getInputElement() )
        continue;

    // this code is never reached
    if ( elem.requiredContent && !this._.editor.activeFilter.check( elem.requiredContent ) )
	    elem.disable();
    else {
        elem.enable();
        enableElements++;
    }
}

// and enableElements remains 0, so the tab is disabled

if ( !enableElements || ( requiredContent && !this._.editor.activeFilter.check( requiredContent ) ) )
    tab[ 0 ].addClass( 'cke_dialog_tab_disabled' );
else
    tab[ 0 ].removeClass( 'cke_dialog_tab_disabled' );
}}}


"	Bug	closed	Normal		UI : Dialogs	4.4.7	expired		
