Skip to content

Commit

Permalink
[FIX] Not scroll back to top after review
Browse files Browse the repository at this point in the history
st3v3nmw#971
Squashed commit 7e568fb
  • Loading branch information
ronzulu committed Jul 16, 2024
1 parent 938bd97 commit a770393
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- [FIX] Include link parsing for Review context https://github.com/st3v3nmw/obsidian-spaced-repetition/pull/964
- Fixed notes selection when all notes are reviewed. [`#548`](https://github.com/st3v3nmw/obsidian-spaced-repetition/issues/548)
- [FIX] Folder ignore sorts all folder starting with string https://github.com/st3v3nmw/obsidian-spaced-repetition/pull/972
- [FIX] Not scroll back to top after review https://github.com/st3v3nmw/obsidian-spaced-repetition/pull/971


#### [1.12.4](https://github.com/st3v3nmw/obsidian-spaced-repetition/compare/1.12.3...1.12.4)

Expand Down
2 changes: 2 additions & 0 deletions src/gui/FlashcardReviewView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ export class FlashcardReviewView {
this.content,
this._currentQuestion.questionText.textDirection,
);
// Set scroll position back to top
this.content.scrollTop = 0;

// Setup response buttons
this._resetResponseButtons();
Expand Down
3 changes: 1 addition & 2 deletions src/util/RenderMarkdownWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ export class RenderMarkdownWrapper {
el = containerEl.createDiv();
el.setAttribute("dir", "rtl");
} else el = containerEl;

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

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

0 comments on commit a770393

Please sign in to comment.