Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Not scroll back to top after review #971

Merged
merged 3 commits into from
Jul 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/gui/FlashcardReviewView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ export class FlashcardReviewView {
this._currentNote.filePath,
);
await wrapper.renderMarkdownWrapper(this._currentCard.front, this.content);
// Set scroll position back to top
this.content.scrollTop = 0;

// Setup response buttons
this._resetResponseButtons();
Expand Down
2 changes: 1 addition & 1 deletion src/util/RenderMarkdownWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class RenderMarkdownWrapper {
): Promise<void> {
if (recursiveDepth > 4) return;

MarkdownRenderer.renderMarkdown(markdownString, containerEl, this.notePath, this.plugin);
MarkdownRenderer.render(this.app, markdownString, containerEl, this.notePath, this.plugin);

containerEl.findAll(".internal-embed").forEach((el) => {
const link = this.parseLink(el.getAttribute("src"));
Expand Down
Loading