From dfe65db5bba9c8cbff4c1bbac682b31c16ca1d9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Fri, 18 May 2018 16:12:48 +0200 Subject: [PATCH] Fix position of inspectors/context inside dialogs Override #addSurface instead of #getSurfaceConfig, so that the $overlayContainer option only applies to the "main" surface of the Target rather than all of the surfaces (including those in TargetWidgets). Bug: T194433 Change-Id: I61c609e2d52814b4547fb5292a0bfb237c4c218f --- .../ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js index 15ab6522cb..e71536bb93 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js @@ -171,10 +171,9 @@ ve.init.mw.DesktopArticleTarget.static.platformType = 'desktop'; /** * @inheritdoc */ -ve.init.mw.DesktopArticleTarget.prototype.getSurfaceConfig = function ( config ) { - return ve.init.mw.DesktopArticleTarget.super.prototype.getSurfaceConfig.call( this, ve.extendObject( { - $overlayContainer: $( '#content' ) - }, config ) ); +ve.init.mw.DesktopArticleTarget.prototype.addSurface = function ( dmDoc, config ) { + config = ve.extendObject( { $overlayContainer: $( '#content' ) }, config ); + return ve.init.mw.DesktopArticleTarget.parent.prototype.addSurface.call( this, dmDoc, config ); }; /**