jenkins-bot has submitted this change and it was merged.

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(-)

Approvals:
  DLynch: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: I0930ac8d227a8a1cff86bd5fdd38be42ec979b61
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Divec <da...@troi.org>
Gerrit-Reviewer: DLynch <dly...@wikimedia.org>
Gerrit-Reviewer: Esanders <esand...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to