Skip to content

Commit 15f6350

Browse files
committed
MC-19639: Admin Analytics modal allows user to navigate the admin
1 parent 931ed37 commit 15f6350

File tree

1 file changed

+12
-3
lines changed
  • app/code/Magento/AdminAnalytics/view/adminhtml/web/js/modal

1 file changed

+12
-3
lines changed

app/code/Magento/AdminAnalytics/view/adminhtml/web/js/modal/component.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ define([
4141
initModalEvents: function () {
4242
this._super();
4343
//Don't allow ESC key to close modal
44-
this.options.keyEventHandlers.escapeKey = function(e){e.preventDefault()};
44+
this.options.keyEventHandlers.escapeKey = this.handleEscKey.bind(this);
4545
//Restrict tab action to the modal
4646
this.options.keyEventHandlers.tabKey = this.handleTabKey.bind(this);
4747

@@ -116,10 +116,10 @@ define([
116116
* Allows admin usage popup to be shown first and then new release notification
117117
*/
118118
openReleasePopup: function () {
119-
var notificationModal = registry.get('release_notification.release_notification.notification_modal_1');
119+
var notificationModalSelector = 'release_notification.release_notification.notification_modal_1';
120120

121121
if (analyticsPopupConfig.releaseVisible) {
122-
notificationModal.initializeContentAfterAnalytics();
122+
registry.get(notificationModalSelector).initializeContentAfterAnalytics();
123123
}
124124
},
125125

@@ -163,6 +163,15 @@ define([
163163
default:
164164
break;
165165
}
166+
},
167+
168+
/**
169+
* Handle Esc key
170+
*
171+
* Esc key should not close modal
172+
*/
173+
handleEscKey: function(event){
174+
event.preventDefault();
166175
}
167176
}
168177
);

0 commit comments

Comments
 (0)