You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Diva listens for keydown events on the document for its keyboard controls features, and tries to track whether the last click on the page was within a Diva instance to decide whether a given instance should handle the key press. It just occurred to me that a better way to handle this might be to set tabindex on the diva-outer element so that it can receive focus, and then listen for events there. I think that would give the expected behaviour, and also handle some other cases, like when the user changes focus by tabbing.
A minor complication here is that currently Diva instances consider themselves active upon instantiation. Since that means that multiple instances can be active at once if and only if the user never clicks anything I think that's just a bug, but it has the consequence that initially a Diva instance will accept keyboard input, assuming the user hasn't done anything. This change would break that.
The text was updated successfully, but these errors were encountered:
Currently, Diva listens for keydown events on the document for its keyboard controls features, and tries to track whether the last click on the page was within a Diva instance to decide whether a given instance should handle the key press. It just occurred to me that a better way to handle this might be to set
tabindex
on the diva-outer element so that it can receive focus, and then listen for events there. I think that would give the expected behaviour, and also handle some other cases, like when the user changes focus by tabbing.A minor complication here is that currently Diva instances consider themselves active upon instantiation. Since that means that multiple instances can be active at once if and only if the user never clicks anything I think that's just a bug, but it has the consequence that initially a Diva instance will accept keyboard input, assuming the user hasn't done anything. This change would break that.
The text was updated successfully, but these errors were encountered: