How do I go about using a Host Listener for a kendo-dialog? My team and I haven't had enough time to sit down and talk through this, and we've been busy with other things and pushing this aside. However, it has resurfaced, and this time it should probably get figured out.
1 Answer, 1 is accepted
0
Svet
Telerik team
answered on 20 Jul 2020, 07:18 AM
Hi Andrew,
I am not sure that I understand what is the specific use - case scenario and what is required. Generally, the Angular @HostListener can be used to handle global events only for the window, document, body, and components host elements as stated in the following article extracted from StackOverflow:
Thus, it seems that what you are trying to achieve with the HostListener and the Dialog isn't supported by the framework. What could be done is to listen for Enter key press events globally or per component and check if there is currently a Dialog instance in order to perform any subsequent implementation. Could I ask you for some more details describing the use - case scenario and what should happen once the enter key is pressed. That will help us to better understand the specific scenario and we will be able to provide some further more specific suggestions. Thank you. We are looking forward to your reply.