Modal focus trap multiple key event listeners.
I have added a modal with a form in it and it seems that if autoinit is run multiple times for whatever reason, the keyboard listener is bound multiple times, so every time you press the tab key to go to the next field, you end up somewhere not expected. If I set [--tab-accessibility-limited:false], and don't use the focus trap, the tab key works as expected.
Looking through the autoinit code, it seems like a if a check was added to ensure that the keyboard listener is only bound once, it should fix the issue.
I have added a modal with a form in it and it seems that if autoinit is run multiple times for whatever reason, the keyboard listener is bound multiple times, so every time you press the tab key to go to the next field, you end up somewhere not expected. If I set [--tab-accessibility-limited:false], and don't use the focus trap, the tab key works as expected.
Looking through the autoinit code, it seems like a if a check was added to ensure that the keyboard listener is only bound once, it should fix the issue.
Thanks for your comment. We will check this and improve it in the next version.
Hey @ericfri - thanks for reporting the issue. We've just pushed the fixes in the v2.1.0 update. Thanks!