UX: take custom markup into account when docking header
This commit is contained in:
parent
80ceb57c76
commit
ac7b058849
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue