mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🚨
This commit is contained in:
parent
5981e78116
commit
1f834bc041
1 changed files with 2 additions and 2 deletions
|
|
@ -226,8 +226,8 @@ export class Outline extends Model {
|
|||
}
|
||||
if (currentElement) {
|
||||
currentElement.classList.add("b3-list-item--focus");
|
||||
const currentRect = currentElement.getBoundingClientRect()
|
||||
const scrollRect = this.element.getBoundingClientRect()
|
||||
const currentRect = currentElement.getBoundingClientRect();
|
||||
const scrollRect = this.element.getBoundingClientRect();
|
||||
if (currentRect.top < scrollRect.top) {
|
||||
currentElement.scrollIntoView();
|
||||
} else if (currentRect.bottom > scrollRect.bottom) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue