A platform for community discussion. Free, open, simple.
UX: Use header top to calculate docking position
Vinoth Kannand07880814459
diff --git a/app/assets/javascripts/discourse/components/site-header.js.es6 b/app/assets/javascripts/discourse/components/site-header.js.es6index 3135911983d..970f3a83bf3 100644--- a/app/assets/javascripts/discourse/components/site-header.js.es6+++ b/app/assets/javascripts/discourse/components/site-header.js.es6@@ -24,13 +24,14 @@ const SiteHeaderComponent = MountWidget.extend(Docking, {},dockCheck(info) {- const $body = $("body");+ const $header = $("header.d-header");if (this.docAt === null) {- if (!($body && $body.length === 1)) return;- this.docAt = $body.offset().top;+ if (!($header && $header.length === 1)) return;+ this.docAt = $header.offset().top;}+ const $body = $("body");const offset = info.offset();if (offset >= this.docAt) {if (!this.dockedHeader) {