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

Change subject: Remove surface dependencies from lookup widget
......................................................................


Remove surface dependencies from lookup widget

Objective:
* Use <body> instead of the closest surface overlay as the default
  overlay (wasn't actually being used anyway)
* Use this.$.offsetParent instead of closest surface when measuring
  parent frame offset to position text input menu

Change-Id: I04fc5ff1da4bafd342093922a5bd3b3a784b327c
---
M modules/ve/ui/widgets/ve.ui.LookupInputWidget.js
M modules/ve/ui/widgets/ve.ui.TextInputMenuWidget.js
2 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/modules/ve/ui/widgets/ve.ui.LookupInputWidget.js 
b/modules/ve/ui/widgets/ve.ui.LookupInputWidget.js
index d170b45..cb92782 100644
--- a/modules/ve/ui/widgets/ve.ui.LookupInputWidget.js
+++ b/modules/ve/ui/widgets/ve.ui.LookupInputWidget.js
@@ -17,7 +17,7 @@
  * @constructor
  * @param {ve.ui.TextInputWidget} input Input widget
  * @param {Object} [config] Configuration options
- * @cfg {jQuery} [$overlay=this.$$( '.ve-surface-overlay-local:last' )] 
Overlay layer
+ * @cfg {jQuery} [$overlay=this.$$( 'body' )] Overlay layer
  */
 ve.ui.LookupInputWidget = function VeUiLookupInputWidget( input, config ) {
        // Config intialization
@@ -25,7 +25,7 @@
 
        // Properties
        this.lookupInput = input;
-       this.$overlay = config.$overlay || this.$$( 
'.ve-surface-overlay-local:last' );
+       this.$overlay = config.$overlay || this.$$( 'body' );
        this.lookupMenu = new ve.ui.TextInputMenuWidget( this, {
                '$$': ve.Element.get$$( this.$overlay ),
                'input': this.lookupInput,
diff --git a/modules/ve/ui/widgets/ve.ui.TextInputMenuWidget.js 
b/modules/ve/ui/widgets/ve.ui.TextInputMenuWidget.js
index db6f45a..0fcf779 100644
--- a/modules/ve/ui/widgets/ve.ui.TextInputMenuWidget.js
+++ b/modules/ve/ui/widgets/ve.ui.TextInputMenuWidget.js
@@ -92,7 +92,7 @@
        // Compensate for frame position if in a differnt frame
        if ( this.input.$$.frame && this.input.$$.context !== 
this.$[0].ownerDocument ) {
                frameOffset = ve.Element.getRelativePosition(
-                       this.input.$$.frame.$, this.$.closest( '.ve-ui-surface' 
)
+                       this.input.$$.frame.$, this.$.offsetParent()
                );
                dimensions.left += frameOffset.left;
                dimensions.top += frameOffset.top;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I04fc5ff1da4bafd342093922a5bd3b3a784b327c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Trevor Parscal <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to