jenkins-bot has submitted this change and it was merged.
Change subject: getViewportDimensions: Fix calculation of 'bottom'
......................................................................
getViewportDimensions: Fix calculation of 'bottom'
When the top of the surface is in view, 'top' is clipped
to 0, so we can't calculate 'bottom' from this value.
Instead compute it as the height of the viewport added to
the surface scroll offset (-rect.top).
This fixes issues with DesktopContext floating near the
top of the page.
Change-Id: Ib0c06fe0d82eda1abb9151356025de995e5c0f45
---
M src/ui/ve.ui.Surface.js
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Jforrester: Looks good to me, approved
jenkins-bot: Verified
diff --git a/src/ui/ve.ui.Surface.js b/src/ui/ve.ui.Surface.js
index f2602e5..2c576ad 100644
--- a/src/ui/ve.ui.Surface.js
+++ b/src/ui/ve.ui.Surface.js
@@ -260,7 +260,7 @@
}
top = Math.max( this.toolbarHeight - rect.top, 0 );
- bottom = top + $( this.getElementWindow() ).height() -
this.toolbarHeight;
+ bottom = $( this.getElementWindow() ).height() - rect.top;
return {
top: top,
--
To view, visit https://gerrit.wikimedia.org/r/268112
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib0c06fe0d82eda1abb9151356025de995e5c0f45
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: DLynch <[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