Don't use jQuery show() or toggle()

These set display explicitly to block, which overrides the CSS
style of display: table-caption.

Change-Id: Id987d6e8da9c875a120a4f07560fa8a97bef10b6
This commit is contained in:
Ed Sanders 2014-06-13 17:37:14 +01:00
parent a1984590b3
commit c761a20cef

View file

@ -139,7 +139,8 @@ ve.ce.MWBlockImageNode.prototype.updateCaption = function () {
}
}
if ( this.$caption ) {
this.$caption.toggle( this.captionVisible );
// Don't use show() as it sets display to block, overriding the stylesheet.
this.$caption.css( 'display', this.captionVisible ? '' : 'none' );
}
};