NativeButton's ClickListener not fired in IE after a Notification

Hi.

I’m having some problems with a native button. I have an application with many different controls. One of these controls is a native button with a click listener. After displaying a modal notification, a button click does not fire the click listener in IE9 and IE10. In Chrome and Firefox the click listener is always fired, as expected.

To demonstrate the misbehaviour, i created a new Vaadin 7 Project using the wizard in eclipse and choosed Vaadin version 7.2.0. I changed the init method of the UI derived class to this:

    @Override
    protected void init(VaadinRequest request) {
    
        final VerticalLayout layout = new VerticalLayout();
        layout.setMargin(true);
        setContent(layout);

        Button button = new NativeButton("Click Me");
        button.addClickListener(new Button.ClickListener() {
            public void buttonClick(ClickEvent event) {
                layout.addComponent(new Label("Thank you for clicking: " + ++i));

                Notification.show("some notification", "some description", Type.ERROR_MESSAGE);
            }
        });
        layout.addComponent(button);
    }

What am i doing wrong? Any hints are appreciated. Thanks in advance.

Regards,
Volker Goehrke.

Hi,

The error message notification doesn’t allow users to interact with the application while the error message is displayed. You could change the notication type to Type.WARNING_MESSAGE for example.

From the Book of Vaadin:
“Error messages are notifications that require the highest user attention, with alert colors, and they require the user to click the message to dismiss it. The error message box does not itself include an instruction to click the message, although the close box in the upper right corner indicates it visually. Unlike with other notifications, the user can not interact with the application while the error message is displayed.”
https://vaadin.com/book/vaadin7/-/page/application.notifications.html

Thanks for your answer, but i thought it was obvious, that the error message is already closed. To make it clear, the change listener is not fired, after the error message is closed and the button was clicked again. Opening the website and clicking the button, the listener is fired and the error message is displayed. Then the error message is closed and the button is clicked again. The listener is not fired again, as i would expect it.

I can confirm this behaviour also in IE 11. It also seems from a quick test that the click event is properly fired in the Html/Javascript and gets properly picked up by the GWT class VNativeButton.

The observed behaviour:

  1. click#1 : event fired on client and server → Notification
  2. Closing Notification
  3. click#2 : event fired only on client
  4. click#3 : event fired on both client and server
  5. every future click works as expected until you reload the page

Late reply, but could you
create a ticket
if there isn’t one for this already and this is reproducible with the latest Vaadin release.