diff --git a/CHANGELOG.md b/CHANGELOG.md index 564824314..f66ca15a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Added `if-math-mode` and `if-text-mode` classes to conditionally show virtual keyboard keys. +- **#2086** When navigation a root with an index, the index is now navigater first. ## 0.95.1 (2023-07-25) diff --git a/src/core-atoms/surd.ts b/src/core-atoms/surd.ts index 2784a8ef2..721ba0a3c 100644 --- a/src/core-atoms/surd.ts +++ b/src/core-atoms/surd.ts @@ -60,6 +60,11 @@ export class SurdAtom extends Atom { return latexCommand(command, body); } + // Custom implementation so that the navigation of the index feels natural + get children(): Atom[] { + return [...(this.above ?? []), ...(this.body ?? [])]; + } + render(context: Context): Box | null { // See the TeXbook pg. 443, Rule 11. // http://www.ctex.org/documents/shredder/src/texbook.pdf