From 341480e7cfa048b6cb24b4c5d81b7f95ed2d27a2 Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 6 Nov 2023 22:26:17 +0100 Subject: [PATCH] scroll padding widget only on text and code notes --- src/public/app/widgets/scroll_padding.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/public/app/widgets/scroll_padding.js b/src/public/app/widgets/scroll_padding.js index 1ccea4d1aa..f42b5e68ff 100644 --- a/src/public/app/widgets/scroll_padding.js +++ b/src/public/app/widgets/scroll_padding.js @@ -3,6 +3,10 @@ import NoteContextAwareWidget from "./note_context_aware_widget.js"; const TPL = `
`; export default class ScrollPaddingWidget extends NoteContextAwareWidget { + isEnabled() { + return super.isEnabled() && ["text", "code"].includes(this.note?.type); + } + doRender() { this.$widget = $(TPL); this.contentSized();