after upgrading my vaadin application from 24.3.2 to 24.6.0 I receive many entires in my logfile:
Ignored listener invocation for ui-poll event from the client side for an inert body element
Ignored listener invocation for selected-changed event from the client side for an inert vaadin-tabs element
Ignored listener invocation for opened-changed event from the client side for an inert vaadin-notification element
…
1-5 messages per minute are listed. Is this only an information or is something to do?
It seems it happens for example if a modal dialoge is opened and my poll listener still is active in the background:
That’s the effect of the server-side modality curtain. Most probable cause is that there’s a modal dialog open, and the component receiving the event is not placed in the dialog, but it’s “below” the dialog (obscured by the modality curtain).
Under normal circumstances you can work around this by addding @AllowInert annotation to your @ClientCallable-annotated function, but yours are a different use-case:
First case is a poll listener of a <body> element; there’s no place to add the @AllowInert annotation
Second case is a standard calls from <vaadin-tabs> component, and there’s no place to add the @AllowInert annotation either.
However, the “UI Polls not received because UI is inert because there’s a modal dialog” behavior smells like a bug to me. I think, in this case, UI polls should be allowed. But it’s best to open a bug report at Vaadin Flow and discuss the matter further.
However, as Martin said, it could be good to have an override for addPollListener(ComponentEventListener<PollEvent> listener, boolean allowInert) to specify the behavior based on the use case.
Please create an issue at Flow repository if you think it could be a beneficial enhancement for the framework.