From 43699fe94cf2febdb1335ab83a86d44f07e3c121 Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Tue, 13 Jun 2023 18:41:08 +0100 Subject: [PATCH] Exclude after-aligned tools when creating target widgets Bug: T338978 Change-Id: I86d2546926fa58c36d3679a2d6d31b5a89e6364f --- modules/ve-mw/init/targets/ve.init.mw.Target.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/ve-mw/init/targets/ve.init.mw.Target.js b/modules/ve-mw/init/targets/ve.init.mw.Target.js index 4ed2eebba9..492d45d95b 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.Target.js +++ b/modules/ve-mw/init/targets/ve.init.mw.Target.js @@ -299,7 +299,9 @@ ve.init.mw.Target.prototype.createTargetWidget = function ( config ) { // Reset to visual mode for target widgets modes: [ 'visual' ], defaultMode: 'visual', - toolbarGroups: this.toolbarGroups, + toolbarGroups: this.toolbarGroups.filter( function ( group ) { + return group.align !== 'after'; + } ), surfaceClasses: this.getSurfaceClasses() }, config ) ); };