honkit
honkit copied to clipboard
theme-default: Deprivation of focus when loading the page.
I notice that creating https://stackblitz.com/edit/honkit-template?file=README.md
It is a bit cumbersome to lose focus on the editor when changing documents.
Probably, following step got the focus. https://github.com/honkit/honkit/blob/3d9392bcd67b403c895f524d5fb3d5612c7fd288/packages/@honkit/theme-default/src/js/theme/navigation.js#L375-L379
Originally posted by @azu in https://github.com/honkit/honkit/issues/366#issuecomment-1642887605
I do know why .focus().
If https://stackblitz.com/edit/honkit-template?file=README.md (the case of iframes), we can probably get around this by using https://developer.mozilla.org/en-US/docs/Web/API/Document/activeElement.