Inez has uploaded a new change for review.

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


Change subject: Apply DOM changes in onProtectedSetup and onProtectedTeatdown 
instead of construictor
......................................................................

Apply DOM changes in onProtectedSetup and onProtectedTeatdown instead of 
construictor

Change-Id: Icf14e2164e89114e6b7c10672b782d02f4c5daac
---
M modules/ve/ce/ve.ce.ProtectedNode.js
1 file changed, 10 insertions(+), 5 deletions(-)


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

diff --git a/modules/ve/ce/ve.ce.ProtectedNode.js 
b/modules/ve/ce/ve.ce.ProtectedNode.js
index fac7266..30313b3 100644
--- a/modules/ve/ce/ve.ce.ProtectedNode.js
+++ b/modules/ve/ce/ve.ce.ProtectedNode.js
@@ -26,11 +26,6 @@
                'setup': 'onProtectedSetup',
                'teardown': 'onProtectedTeardown'
        } );
-
-       // DOM changes
-       this.$
-               .addClass( 've-ce-protectedNode' )
-               .prop( 'contentEditable', 'false' );
 };
 
 /* Static Properties */
@@ -85,6 +80,11 @@
        this.getRoot().getSurface().getSurface()
                .connect( this, { 'position': 'positionPhantoms' } );
 
+       // DOM changes
+       this.$
+               .addClass( 've-ce-protectedNode' )
+               .prop( 'contentEditable', 'false' );
+
        // Shields
        this.$.add( this.$.find( '*' ) ).each( function () {
                var $this = $( this );
@@ -130,6 +130,11 @@
        // Phantoms
        this.clearPhantoms();
 
+       // DOM changes
+       this.$
+               .removeClass( 've-ce-protectedNode' )
+               .removeProp( 'contentEditable' );
+
        this.isSetup = false;
 };
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf14e2164e89114e6b7c10672b782d02f4c5daac
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

Reply via email to