|
@ -18,19 +18,25 @@ |
|
|
field.classList[input.value ? 'remove' : 'add']('empty'); |
|
|
field.classList[input.value ? 'remove' : 'add']('empty'); |
|
|
} |
|
|
} |
|
|
positionLabel(input); |
|
|
positionLabel(input); |
|
|
input.addEventListener('keyup', function(event) { positionLabel(event.target); }); |
|
|
input.addEventListener('keyup', function(event) { |
|
|
input.addEventListener('blur', function(event) { field.classList.remove('focused'); }); |
|
|
positionLabel(event.target); |
|
|
input.addEventListener('focus', function(event) { field.classList.add('focused'); }); |
|
|
}); |
|
|
|
|
|
input.addEventListener('blur', function(event) { |
|
|
|
|
|
positionLabel(event.target); |
|
|
|
|
|
field.classList.remove('focused'); |
|
|
|
|
|
}); |
|
|
|
|
|
input.addEventListener('focus', function(event) { |
|
|
|
|
|
field.classList.add('focused'); |
|
|
|
|
|
}); |
|
|
}); |
|
|
}); |
|
|
var body = document.querySelector('body'); |
|
|
var body = document.querySelector('body'); |
|
|
var primaryContent = document.getElementById('primary-content'); |
|
|
var primaryContent = document.getElementById('primary-content'); |
|
|
var overlay = document.getElementById('content-overlay'); |
|
|
var overlay = document.getElementById('content-overlay'); |
|
|
primaryContent.addEventListener('keydown', function(event) { |
|
|
primaryContent.addEventListener('keydown', function(event) { |
|
|
|
|
|
if (body.classList.contains('has-overlay')) { |
|
|
event.stopPropagation(); |
|
|
event.stopPropagation(); |
|
|
return false; |
|
|
return false; |
|
|
//if (body.classList.contains('has-overlay')) {
|
|
|
} |
|
|
// return false;
|
|
|
|
|
|
//}
|
|
|
|
|
|
}); |
|
|
}); |
|
|
document.addEventListener('focus', function(event) { |
|
|
document.addEventListener('focus', function(event) { |
|
|
if (overlay.querySelector('.dlg.open') && !overlay.querySelector('.dlg.open :focus')) { |
|
|
if (overlay.querySelector('.dlg.open') && !overlay.querySelector('.dlg.open :focus')) { |
|
|