mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-23 22:33:42 -04:00
Fix initialization logic of sidebar
This commit is contained in:
@@ -37,9 +37,8 @@ export default class Position {
|
||||
? document.querySelector(el)
|
||||
: el
|
||||
|
||||
/* Initialize parent container, top offset and current height */
|
||||
/* Initialize parent container and current height */
|
||||
this.parent_ = this.el_.parentNode
|
||||
this.offset_ = this.el_.offsetTop - this.parent_.offsetTop
|
||||
this.height_ = 0
|
||||
}
|
||||
|
||||
@@ -47,6 +46,7 @@ export default class Position {
|
||||
* Initialize sidebar state
|
||||
*/
|
||||
setup() {
|
||||
this.offset_ = this.el_.offsetTop - this.parent_.offsetTop
|
||||
this.update()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user