1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-13 10:06:23 +02:00

add close btn in modals. fixes #199

This commit is contained in:
Kushagra Gour
2017-10-12 10:30:30 +05:30
parent 508ce715b4
commit dbf6723c16
4 changed files with 53 additions and 4 deletions

View File

@ -1913,6 +1913,11 @@ globalConsoleContainerEl
trackEvent('ui', 'cssSettingsBtnClick');
};
scope.onModalCloseBtnClick = function(e) {
closeAllOverlays();
e.preventDefault();
};
function init() {
var lastCode;
@ -2140,10 +2145,10 @@ globalConsoleContainerEl
});
window.addEventListener('click', function(e) {
if (
typeof e.target.className === 'string' &&
e.target.className.indexOf('modal-overlay') !== -1
) {
if (typeof e.target.className !== 'string') {
return;
}
if (e.target.className.indexOf('modal-overlay') !== -1) {
closeAllOverlays();
}
});