Notification not shown on mobile devices

I’m using Vaadin 24.6.0 and noticed that notifications are not opened in Safari and Chrome on iOS.

I’m using a helper class like this:

public class Notification {

    private Notification() {
    }

    public static void success(String message) {
        com.vaadin.flow.component.notification.Notification notification = createNotification(message);
        notification.addThemeVariants(NotificationVariant.LUMO_SUCCESS);
        notification.open();
    }

    public static void error(String message) {
        com.vaadin.flow.component.notification.Notification notification = createNotification(message);
        notification.addThemeVariants(NotificationVariant.LUMO_ERROR);
        notification.open();
    }

    private static com.vaadin.flow.component.notification.Notification createNotification(String message) {
        return new com.vaadin.flow.component.notification.Notification(message, 3000, com.vaadin.flow.component.notification.Notification.Position.TOP_END);
    }
}

After save for example I call

Notification.success(translate("registration.success"));

In my desktop browsers (Chrome, Safari, Firefox) the notification is displayed but on my iPhone I don’t see any notifications.

Are there any know issues?

1 Like

This is a bug confirmed by Vaadin support: Notifications do not appear on iPhone in Safari and Chrome · Issue #20807 · vaadin/flow · GitHub

Hi! I believe this issue has been fixed by this PR, but the fix hasn’t yet been released in the 24.6 version.

Would be great if this is the same issue.

I tried using the Notification in a 24.6 app and noticed the error (no Notification shown and error in the client console log), but it started working as expected once I forced the app to use my latest web-components repo locally.

1 Like

Could you try it again with V24.6.1?

1 Like

Yes, 24.6.1 solved the issue. Thank you

1 Like

I’m so glad you asked. My broadcast notifications have been broken for a couple of weeks, but I didn’t say anything here because I assumed it was me. :)

1 Like