|
@@ -550,6 +550,19 @@ window.initSegmentMoes = function(_parent) {
|
|
}
|
|
}
|
|
return false;
|
|
return false;
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ $(document)
|
|
|
|
+ .off('keydown.visit-moe-escape')
|
|
|
|
+ .on('keydown.visit-moe-escape', function (e) {
|
|
|
|
+ if(e.which === 27) {
|
|
|
|
+ let visibleMoes = $('[visit-moe] [url]:not([show]):visible');
|
|
|
|
+ if (visibleMoes.length) {
|
|
|
|
+ visibleMoes.hide();
|
|
|
|
+ markEventAsConsumed(e);
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
};
|
|
};
|
|
window.isEventConsumed = function(_e) {
|
|
window.isEventConsumed = function(_e) {
|
|
return _e && _e.originalEvent && _e.originalEvent.stagCosumed
|
|
return _e && _e.originalEvent && _e.originalEvent.stagCosumed
|