Closed gulumige closed 4 years ago
I've been using this as a temporary fix. Thought it might clarify the problem.
~~ $(document).on("keydown", function (event) { if (event.keyCode === 9) $("#style-aria-outlines").empty(); });
~~
(updated)
$(document).on("keydown.aria-outlines", function () {
$("#style-aria-outlines").empty();
});
Ok, so I think I have found what is causing the issue.
If _lastOutlineEvent
is set to "keydown"
when entering a new passage no "keydown"
events will show the outline.
https://github.com/tmedwards/sugarcube-2/blob/ba1a16ec78896b4b2de6219292c579ce216eb049/src/engine.js#L127-L142
https://github.com/tmedwards/sugarcube-2/blob/ba1a16ec78896b4b2de6219292c579ce216eb049/src/engine.js#L639
Anytime passage navigation is triggered in any way other than a mouseclick, the outline highlighting the focused element is not visible until the page is again clicked on.