DLynch has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/343095 )

Change subject: MWNoticesPopupTool: When setting notices, clear existing notices
......................................................................

MWNoticesPopupTool: When setting notices, clear existing notices

This would keep on duplicating notices when switching modes.

Change-Id: I04720904eddd95c0d3618d284d1930e41a0ae137
---
M modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js 
b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
index 9cfec0c..b0dbef1 100644
--- a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
+++ b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
@@ -78,6 +78,10 @@
                mw.language.convertNumber( count )
        ) );
 
+       if ( this.$items ) {
+               this.$items.remove();
+       }
+
        this.$items = $( '<div>' ).addClass( 've-ui-mwNoticesPopupTool-items' );
 
        notices.forEach( function ( itemHtml ) {

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

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

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

Reply via email to