(bug 50113) Do not display captions for block images which are neither frame nor thumb

There is still a problem that those images would get inspector for opening media edit dialog
displayed, and that dialog let's edit caption, which does not make sense in this case, however
that should be a separated bug.

Change-Id: I24491979bc7a27d2380924e48cb677b01e9f8f9b
This commit is contained in:
Inez Korczyński 2013-06-24 15:40:30 -07:00
parent 9fcd7fc6fe
commit 4ddf123b7c

View file

@ -71,7 +71,7 @@ ve.ce.MWBlockImageNode = function VeCeMWBlockImageNode( model, config ) {
this.$resizable = this.$image;
// I smell a caption!
if ( this.model.children.length === 1 ) {
if ( type !== 'none' && this.model.children.length === 1 ) {
captionModel = this.model.children[0];
captionView = ve.ce.nodeFactory.create( captionModel.getType(), captionModel );
captionModel.connect( this, { 'update': 'onModelUpdate' } );