After upgrading my Vaadin application from version 24.3.0 to 24.6.0, I started encountering the following log message whenever a modal dialog is opened:
“Ignored listener invocation for ui-poll event from the client side for an inert body element.”
This issue arises while I have a polling mechanism in place that updates a date-time display every second using a poll listener. The relevant code snippets are as follows:
The modal dialog is implemented in the following abstract class:
public abstract class GenericConfigEditor extends Dialog implements LocaleChangeObserver {
private static final long serialVersionUID = 7757638143891854498L;
protected FormLayout componentLayout;
protected Button btnSave = new Button(new Icon(VaadinIcon.CHECK));
protected Button btnClose = new Button(new Icon(VaadinIcon.CLOSE));
protected Binder<T> binder = new Binder<>();
protected Button helpButton = new Button(VaadinIcon.QUESTION_CIRCLE.create());
protected GenericConfigEditor() {
setCloseOnEsc(false);
setCloseOnOutsideClick(false);
setResizable(false);
setModal(true);
setDraggable(true);
}
}
Steps to Reproduce:
Upgrade Vaadin from version 24.3.0 to 24.6.0.
Open a modal dialog while the date-time polling is active.
Observe the log output for the message regarding ignored listener invocations.
Expected Behavior:
The poll listeners should continue to function properly and not log any ignored listener invocations when a modal dialog is opened.
Actual Behavior:
The log indicates that listener invocations are being ignored, which was not the case in previous versions.
Environment:
Vaadin Version: 24.6.0
Java Version: 21
Spring boot Version : 3.2.5
I would appreciate any insights or solutions regarding this issue, as it affects the logging and potentially the functionality of my application. This ticket format provides clear information about your issue, making it easier for others in the Vaadin community to understand and assist you effectively.
Yes, we can set it to false, but if we do, users will be able to access the background elements. However, we do not want to allow access to those background elements.
private void registerDateTimePollListener() {
UI.getCurrent().setPollInterval(1000);
ComponentUtil.addListener(this, PollEvent.class, event → updateDateTime(), DomListenerRegistration::allowInert);
}
However, I am still encountering the same issue.
Did you remember to also remove the original poll listener? Could there be some other part of the application that adds another listener? Finally, check that the error message is still for the ui-poll event rather than some other event name.