// Handle blur and Enter key events
input.addEventListener('blur', updateCell);
input.addEventListener('keyup', function(e) {
input.addEventListener('keydown', function(e) {
if (e.key === 'Enter') updateCell();
if (e.key === 'Enter') {
e.preventDefault();
e.stopPropagation();
updateCell();
}
});
function updateCell() {
-