UX: take custom markup into account when docking header

This commit is contained in:
Joe 2018-11-13 14:47:12 +08:00 committed by GitHub
parent 80ceb57c76
commit ac7b058849
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -24,13 +24,13 @@ const SiteHeaderComponent = MountWidget.extend(Docking, {
},
dockCheck(info) {
const $body = $("body");
if (this.docAt === null) {
const outlet = $("#main-outlet");
if (!(outlet && outlet.length === 1)) return;
this.docAt = outlet.offset().top;
if (!($body && $body.length === 1)) return;
this.docAt = $body.offset().top;
}
const $body = $("body");
const offset = info.offset();
if (offset >= this.docAt) {
if (!this.dockedHeader) {