﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
13218	"""Uncaught TypeError: Cannot read property 'filter' of undefined "" and  ""Uncaught TypeError: Cannot read property 'removeClass' of undefined "" after widget drop"	Radoslav Petkov	Szymon Cofalik	"I have strange behaviour with my custom widget that does not happen on other widgets.I thought it is from my plugin.js but it seems the error comes from the CKEditor's widget api and i wanted to share the errors with you.

The attached gif shows in what situation the errors occur.

Here is the code that defines the widget


{{{
    editor.widgets.add('widgetCast', {
        template: '<div class=""container-fluid layout-container"">\
                        <div class=""row layout-row"">\
                             <div id=""layout-column-one"" class=""col-xs-6 col-sm-6 col-md-6 col-lg-6 layout-column"">\
                                 <p>content</p>\
                             </div>\
                            <div id=""layout-column-two"" class=""col-xs-6 col-sm-6 col-md-6 col-lg-6 layout-column"">\
                                <p>content</p>\
                            </div>\
                        </div>\
                    </div>',
        upcast: function(element) {
            return (element.name == 'div' && element.hasClass('layout-container'));
        },
        editables: {
            layoutColumn1: {
                selector: '#layout-column-one',
                allowedContent: allowedContent
            },
            layoutColumn2: {
                selector: '#layout-column-two',
                allowedContent: allowedContent
            }
        },
        allowedContent: allowedContent
    });
}}}

"	Bug	closed	Normal		UI : Widgets	4.5.0 Beta	fixed		
