From 699579e646ba2f0a2b7d234ec9ccf0fdd71cab3d Mon Sep 17 00:00:00 2001 From: Nicholas Ray Date: Thu, 13 Jan 2022 11:57:48 -0700 Subject: [PATCH] Add clarifying comment for why scroll padding is applied to html tag. Change-Id: I9f4b44536b1e8aace41c8699a0d1946a54aa0bfe --- includes/SkinVector.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/SkinVector.php b/includes/SkinVector.php index 0c14d1a..237157f 100644 --- a/includes/SkinVector.php +++ b/includes/SkinVector.php @@ -494,6 +494,10 @@ class SkinVector extends SkinMustache { // the user navigates to a page with a hash fragment in the URI). For this // reason, we can't rely on the `vector-sticky-header-visible` class as it // is added too late. + // + // Please note that this class applies scroll padding which does not work + // when applied to the body tag in Chrome, Safari, and Firefox (and + // possibly others). It must instead be applied to the html tag. $original['class'] = implode( ' ', [ $original['class'] ?? '', self::STICKY_HEADER_ENABLED_CLASS ] ); }