mirror of
https://github.com/zadam/trilium.git
synced 2025-12-13 02:44:24 +01:00
fix(floating_buttons): wrong position when at the top of the note
This commit is contained in:
parent
fb6c82740c
commit
3514e3d057
@ -69,7 +69,7 @@ export default class ContentHeader extends Container<BasicWidget> {
|
|||||||
|
|
||||||
updateSafeMargin() {
|
updateSafeMargin() {
|
||||||
const parentEl = this.parentElement?.closest<HTMLDivElement>(".note-split");
|
const parentEl = this.parentElement?.closest<HTMLDivElement>(".note-split");
|
||||||
if (this.isFloating) {
|
if (this.isFloating || this.parentElement!.scrollTop === 0) {
|
||||||
parentEl!.style.setProperty("--content-header-height", `${this.currentHeight}px`);
|
parentEl!.style.setProperty("--content-header-height", `${this.currentHeight}px`);
|
||||||
} else {
|
} else {
|
||||||
parentEl!.style.removeProperty("--content-header-height");
|
parentEl!.style.removeProperty("--content-header-height");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user