Inez has uploaded a new change for review.
https://gerrit.wikimedia.org/r/67905
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(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor
refs/changes/05/67905/1
diff --git a/modules/ve/ce/nodes/ve.ce.MWInlineImageNode.js
b/modules/ve/ce/nodes/ve.ce.MWInlineImageNode.js
index bded49d..d42265e 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 out 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: newchange
Gerrit-Change-Id: I8daac35c752ad33691955b2493191be990c78f58
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Inez <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits