Catrope has uploaded a new change for review.
https://gerrit.wikimedia.org/r/143524
Change subject: Use globalOverlay as the contextOverlay in MobileContext
......................................................................
Use globalOverlay as the contextOverlay in MobileContext
In DesktopContext we use localOverlay, but since inspectors
are full-screen on mobile, the localOverlay is actually
on top of the inspector. This caused link inspector suggestions
to not be shown.
Change-Id: I95883164797f6fb27659abf6445be98133c19581
---
M modules/ve/ui/ve.ui.Context.js
M modules/ve/ui/ve.ui.MobileContext.js
2 files changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor
refs/changes/24/143524/1
diff --git a/modules/ve/ui/ve.ui.Context.js b/modules/ve/ui/ve.ui.Context.js
index cfef8d9..da4058e 100644
--- a/modules/ve/ui/ve.ui.Context.js
+++ b/modules/ve/ui/ve.ui.Context.js
@@ -15,15 +15,18 @@
* @constructor
* @param {ve.ui.Surface} surface
* @param {Object} [config] Configuration options
+ * @cfg {jQuery} [$contextOverlay=this.$element] Overlay to use for menus in
inspectors
*/
ve.ui.Context = function VeUiContext( surface, config ) {
+ config = $.extend( { '$contextOverlay': this.$element }, config );
+
// Parent constructor
OO.ui.Element.call( this, config );
// Properties
this.surface = surface;
this.inspectors = new ve.ui.WindowSet(
- ve.ui.windowFactory, { '$': this.$, '$contextOverlay':
this.$element }
+ ve.ui.windowFactory, { '$': this.$, '$contextOverlay':
config.$contextOverlay }
);
this.context = new ve.ui.ContextWidget( { '$': this.$ } );
this.afterModelChangeTimeout = null;
diff --git a/modules/ve/ui/ve.ui.MobileContext.js
b/modules/ve/ui/ve.ui.MobileContext.js
index 456bdfd..039ea76 100644
--- a/modules/ve/ui/ve.ui.MobileContext.js
+++ b/modules/ve/ui/ve.ui.MobileContext.js
@@ -16,6 +16,8 @@
* @param {Object} [config] Configuration options
*/
ve.ui.MobileContext = function VeUiMobileContext( surface, config ) {
+ config = $.extend( { '$contextOverlay': surface.$globalOverlay },
config );
+
// Parent constructor
ve.ui.Context.call( this, surface, config );
--
To view, visit https://gerrit.wikimedia.org/r/143524
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I95883164797f6fb27659abf6445be98133c19581
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits