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

Change subject: ClippableElement: Fix behavior of long clippables
......................................................................


ClippableElement: Fix behavior of long clippables

Revert misguided bit of code from f5823566 which caused funny
behavior when the clippable was higher than the screen.

I am sincerely hoping that we will never need clipping with the top
edge of the screen (or: popups that pop up upwards), because it will
not work. (Conversely, clippables wider than the screen do not work
correctly now, but they can be clipped with either right or left
edge.)

If we ever decide we need that, then ClippableElement will need to
know to which edge the clippable is anchored to be able to
reasonably decide how to clip it.

Bug: T98506
Change-Id: I3b5925999e0ee5f46f3865abf17f184a5b7d0a55
---
M src/elements/ClippableElement.js
1 file changed, 1 insertion(+), 4 deletions(-)

Approvals:
  Anomie: Looks good to me, but someone else must approve
  Trevor Parscal: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/elements/ClippableElement.js b/src/elements/ClippableElement.js
index 33b0b23..8c9f2e1 100644
--- a/src/elements/ClippableElement.js
+++ b/src/elements/ClippableElement.js
@@ -167,16 +167,13 @@
                ccOffset = $container.offset() || { top: 0, left: 0 },
                ccHeight = $container.innerHeight() - buffer,
                ccWidth = $container.innerWidth() - buffer,
-               cHeight = this.$clippable.outerHeight() + buffer,
                cWidth = this.$clippable.outerWidth() + buffer,
                scrollTop = this.$clippableScroller.scrollTop(),
                scrollLeft = this.$clippableScroller.scrollLeft(),
                desiredWidth = cOffset.left < 0 ?
                        cWidth + cOffset.left :
                        ( ccOffset.left + scrollLeft + ccWidth ) - cOffset.left,
-               desiredHeight = cOffset.top < 0 ?
-                       cHeight + cOffset.top :
-                       ( ccOffset.top + scrollTop + ccHeight ) - cOffset.top,
+               desiredHeight = ( ccOffset.top + scrollTop + ccHeight ) - 
cOffset.top,
                naturalWidth = this.$clippable.prop( 'scrollWidth' ),
                naturalHeight = this.$clippable.prop( 'scrollHeight' ),
                clipWidth = desiredWidth < naturalWidth,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3b5925999e0ee5f46f3865abf17f184a5b7d0a55
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz DziewoƄski <matma....@gmail.com>
Gerrit-Reviewer: Anomie <bjor...@wikimedia.org>
Gerrit-Reviewer: Esanders <esand...@wikimedia.org>
Gerrit-Reviewer: Trevor Parscal <tpars...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to