jenkins-bot has submitted this change and it was merged.
Change subject: Wrap inline images in spans with display: inline-block.
......................................................................
Wrap inline images in spans with display: inline-block.
Change-Id: I8daac35c752ad33691955b2493191be990c78f58
---
M modules/ve/ce/nodes/ve.ce.MWInlineImageNode.js
1 file changed, 5 insertions(+), 2 deletions(-)
Approvals:
Jforrester: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/ve/ce/nodes/ve.ce.MWInlineImageNode.js
b/modules/ve/ce/nodes/ve.ce.MWInlineImageNode.js
index bded49d..09d2195 100644
--- a/modules/ve/ce/nodes/ve.ce.MWInlineImageNode.js
+++ b/modules/ve/ce/nodes/ve.ce.MWInlineImageNode.js
@@ -25,8 +25,11 @@
this.$ = this.$$( '<a>' ).addClass( 'image' );
this.$image = this.$$( '<img>' ).appendTo( this.$ );
} else {
- this.$ = this.$$( '<img>' );
- this.$image = this.$;
+ // For inline images that are not linked (empty linkto=) we
intentionally don't match output
+ // of MW Parser, instead we wrap those images in span so
selection and hover (based on
+ // shields) can work well. It might change in the future when
we improve our selection.
+ this.$ = this.$$( '<span>' );
+ this.$image = this.$$( '<img>' ).appendTo( this.$ );
}
// Mixin constructors
--
To view, visit https://gerrit.wikimedia.org/r/67905
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8daac35c752ad33691955b2493191be990c78f58
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Inez <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Trevor Parscal <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits