File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
app/code/Magento/AdminAnalytics/view/adminhtml/web/js/modal Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ define([
41
41
initModalEvents : function ( ) {
42
42
this . _super ( ) ;
43
43
//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 ) ;
45
45
//Restrict tab action to the modal
46
46
this . options . keyEventHandlers . tabKey = this . handleTabKey . bind ( this ) ;
47
47
@@ -116,10 +116,10 @@ define([
116
116
* Allows admin usage popup to be shown first and then new release notification
117
117
*/
118
118
openReleasePopup : function ( ) {
119
- var notificationModal = registry . get ( 'release_notification.release_notification.notification_modal_1' ) ;
119
+ var notificationModalSelector = 'release_notification.release_notification.notification_modal_1' ;
120
120
121
121
if ( analyticsPopupConfig . releaseVisible ) {
122
- notificationModal . initializeContentAfterAnalytics ( ) ;
122
+ registry . get ( notificationModalSelector ) . initializeContentAfterAnalytics ( ) ;
123
123
}
124
124
} ,
125
125
@@ -163,6 +163,15 @@ define([
163
163
default :
164
164
break ;
165
165
}
166
+ } ,
167
+
168
+ /**
169
+ * Handle Esc key
170
+ *
171
+ * Esc key should not close modal
172
+ */
173
+ handleEscKey : function ( event ) {
174
+ event . preventDefault ( ) ;
166
175
}
167
176
}
168
177
) ;
You can’t perform that action at this time.
0 commit comments