Describe the bug
I'm using the simple-keyboard in an Angular project which basically consists of 2 components with same template (both containing a keyboard), each linked to the other through a router.navigateByUrl.
The keyboard displays fine when I initially land on the root component, but as I navigate to the second component, the keyboard doesn't display and its element in the DOM looks empty in the inspector.
This doesn't happen if I directly target the URL writing it in the browser address bar.
The keyboard class needs to be instantiated every time the DOM element is recreated. I believe this doesn't happen in your logic as you change pages, but to confirm I would need a repro. Do you mind providing a test git repo or runnable sandbox example that would allow me to debug this?
I will reopen once that's provided, thanks!
@dmesmin Hi, I also couldn't reproduce it on Stackblitz, but I figured out that the issue only comes up when I navigate from a keyboard page to another keyboard page.
So I solved it with a workaround, navigating first on a different page and then to the target page.
Page 1 (keyboard) --> Page 2 --> Page 3 (keyboard)
Sadly I did not get the repro so I cannot tell for sure what the issue is. That being said, you can try giving different classes to each keyboard:
Alternatively, you can try calling
destroy on route unload:
Hope that helps. Closing the thread as I cannot do much here without repro.
|Issue Title||Created Date||Updated Date|