Closing Notifications

Hello,

Is it possible to close a notification via a keyboard shortcut?

Specifically, I would like to be able to dismiss an Error notification by pressing Escape (in addition to clicking the notification) - is this currently possible?

If not, um, would it be difficult to add to Vaadin-core? It be a fairly safe thing to do, and a fairly reasonable requirement…

Cheers,

Charles

A very reasonable request, and I concur, this should be the default behaviour. A ticket, please :slight_smile:

Thanks Jouni,

Ticket
#6496
created

Charles.

And 24 hours later, the change has been implemented, fixed and delivered - I’m impressed!

Thanks Henri (& Matti)

Cheers,

Charles.

Using Vaadin 6.5.2 is not working neither Esc key nor Enter key. Is there a problem while having Textfields with ShortcutListener for this to work?

using:

getWindow().showNotification("Caption", "Message", Notification.TYPE_ERROR_MESSAGE);

EDIT:

My mistake, was still using 6.5.1 when testing, working fine on 6.5.2, but anyway… is there a way where we can map which Keys should close Error messages? like for example F1 or ENTER?

Thanks in advance,