jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/332758 )
Change subject: FloatableElement: More correctly decide if we need custom
position
......................................................................
FloatableElement: More correctly decide if we need custom position
Bug: T130169
Change-Id: I22f2ca72cf7c2f05f1c0bd7f1acfa30656e50725
---
M src/mixins/FloatableElement.js
1 file changed, 2 insertions(+), 3 deletions(-)
Approvals:
Catrope: Looks good to me, approved
jenkins-bot: Verified
Jforrester: Looks good to me, but someone else must approve
diff --git a/src/mixins/FloatableElement.js b/src/mixins/FloatableElement.js
index 8fa82e5..ced8660 100644
--- a/src/mixins/FloatableElement.js
+++ b/src/mixins/FloatableElement.js
@@ -77,7 +77,7 @@
* @chainable
*/
OO.ui.mixin.FloatableElement.prototype.togglePositioning = function (
positioning ) {
- var closestScrollableOfContainer, closestScrollableOfFloatable;
+ var closestScrollableOfContainer;
positioning = positioning === undefined ? !this.positioning :
!!positioning;
@@ -85,8 +85,7 @@
this.positioning = positioning;
closestScrollableOfContainer =
OO.ui.Element.static.getClosestScrollableContainer( this.$floatableContainer[ 0
] );
- closestScrollableOfFloatable =
OO.ui.Element.static.getClosestScrollableContainer( this.$floatable[ 0 ] );
- this.needsCustomPosition = closestScrollableOfContainer !==
closestScrollableOfFloatable;
+ this.needsCustomPosition = !OO.ui.contains(
this.$floatableContainer[ 0 ], this.$floatable[ 0 ] );
// If the scrollable is the root, we have to listen to scroll
events
// on the window because of browser inconsistencies.
if ( $( closestScrollableOfContainer ).is( 'html, body' ) ) {
--
To view, visit https://gerrit.wikimedia.org/r/332758
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I22f2ca72cf7c2f05f1c0bd7f1acfa30656e50725
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz DziewoĆski <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits