fix(floating_buttons): wrong position when at the top of the note

This commit is contained in:
Elian Doran 2025-12-09 11:46:16 +02:00
parent fb6c82740c
commit 3514e3d057
No known key found for this signature in database

View File

@ -69,7 +69,7 @@ export default class ContentHeader extends Container<BasicWidget> {
updateSafeMargin() {
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`);
} else {
parentEl!.style.removeProperty("--content-header-height");