Catrope has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/75785


Change subject: Fix the save button disappearing on certain pages in Firefox
......................................................................

Fix the save button disappearing on certain pages in Firefox

If the first thing on the page is an image, then we'll try to select
it in Firefox, and get a JS error because .data( 'view' ) is undefined.

It turned out that MWBlockImageNode's onSetup() didn't call the parent
implementation, and all the way up in ve.ce.View.onSetup is where
we set .data( 'view' )

Bug: 51986
Change-Id: I0de3692566b0aa02a229054e07767e45fd5d4a49
---
M modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/85/75785/1

diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js 
b/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js
index fa9fcbb..833ef6a 100644
--- a/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js
+++ b/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js
@@ -138,6 +138,8 @@
        var type = this.model.getAttribute( 'type' ),
                isRTL;
 
+       ve.ce.BranchNode.prototype.onSetup.call( this );
+
        if ( type !== 'none' && type !=='frameless' ) {
                // get the proper alignment for the image inside the editor
                isRTL = ( this.$.css( 'direction' ) === 'rtl' ) ? 1 : 0;

-- 
To view, visit https://gerrit.wikimedia.org/r/75785
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0de3692566b0aa02a229054e07767e45fd5d4a49
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to