Divec has uploaded a new change for review.

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

Change subject: On CBN detach, mark contentBranchNodeChanged in the CE Surface
......................................................................

On CBN detach, mark contentBranchNodeChanged in the CE Surface

Bug: T122291
Change-Id: I0930ac8d227a8a1cff86bd5fdd38be42ec979b61
---
M src/ce/ve.ce.ContentBranchNode.js
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/71/311371/1

diff --git a/src/ce/ve.ce.ContentBranchNode.js 
b/src/ce/ve.ce.ContentBranchNode.js
index ee7ad80..94e6c0c 100644
--- a/src/ce/ve.ce.ContentBranchNode.js
+++ b/src/ce/ve.ce.ContentBranchNode.js
@@ -33,6 +33,7 @@
 
        // Events
        this.connect( this, { childUpdate: 'onChildUpdate' } );
+       this.model.connect( this, { detach: 'onModelDetach' } );
        // Some browsers allow clicking links inside contenteditable, such as 
in iOS Safari when the
        // keyboard is closed
        this.$element.on( 'click', this.onClickHandler );
@@ -354,6 +355,12 @@
        return wrapper;
 };
 
+ve.ce.ContentBranchNode.prototype.onModelDetach = function () {
+       if ( this.root instanceof ve.ce.DocumentNode ) {
+               this.root.getSurface().setContentBranchNodeChanged();
+       }
+};
+
 /**
  * Render contents.
  *

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0930ac8d227a8a1cff86bd5fdd38be42ec979b61
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Divec <da...@troi.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to