Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-on committed Oct 29, 2024
1 parent 430355f commit bba0a07
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function AutoFocusPlugin({
() => {
const rootElement = editor.getRootElement()
if (rootElement) {
// requestAnimationFrame ensures DOM is rendered
// requestAnimationFrame is required here for unknown reasons, possibly related to the Obsidian plugin environment.
requestAnimationFrame(() => {
rootElement.focus()
})
Expand Down

0 comments on commit bba0a07

Please sign in to comment.