I solved my problem, here is my updated code if you needed:
root_element.querySelector('#guest-input').addEventListener('keydown', function(event) {
event.stopPropagation();
if (event.key === 'Enter') {
event.preventDefault();
}
});
root_element.querySelector('#guest-input').addEventListener('input', function() {
updateTable();
});
root_element.querySelector('#event-input').addEventListener('keydown', function(event) {
event.stopPropagation();
if (event.key === 'Enter') {
event.preventDefault();
}
});
root_element.querySelector('#event-input').addEventListener('input', function() {
updateTable();
});
// Rest of my JavaScript code...