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:
@ -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();
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user