diff --git a/rhodecode/public/js/src/components/rhodecode-toast/rhodecode-toast.html b/rhodecode/public/js/src/components/rhodecode-toast/rhodecode-toast.html
--- a/rhodecode/public/js/src/components/rhodecode-toast/rhodecode-toast.html
+++ b/rhodecode/public/js/src/components/rhodecode-toast/rhodecode-toast.html
@@ -1,5 +1,6 @@
+
diff --git a/rhodecode/public/js/src/components/rhodecode-toast/rhodecode-toast.js b/rhodecode/public/js/src/components/rhodecode-toast/rhodecode-toast.js
--- a/rhodecode/public/js/src/components/rhodecode-toast/rhodecode-toast.js
+++ b/rhodecode/public/js/src/components/rhodecode-toast/rhodecode-toast.js
@@ -14,12 +14,29 @@ Polymer({
hasToasts: {
type: Boolean,
computed: '_computeHasToasts(toasts.*)'
+ },
+ keyEventTarget: {
+ type: Object,
+ value: function() {
+ return document.body;
+ }
}
},
+ behaviors: [
+ Polymer.IronA11yKeysBehavior
+ ],
observers: [
'_changedToasts(toasts.splices)'
],
+ keyBindings: {
+ 'esc:keyup': '_hideOnEsc'
+ },
+
+ _hideOnEsc: function (event) {
+ return this.dismissNotifications();
+ },
+
_computeHasToasts: function(){
return this.toasts.length > 0;
},