Fix JavaScript syntax error - remove duplicate keydown handler
BUGFIX: Uncaught SyntaxError expected expression, got ')' PROBLEM: Console error on page load due to malformed JavaScript ROOT CAUSE: Previous replacement left duplicate code fragment: - Closing brace of updateDropdownHighlight function was followed by 'kup.addEventListener' (missing 'loo' prefix) - This created invalid JavaScript syntax - Old keydown handler wasn't fully removed SOLUTION: Removed the duplicate/malformed keydown listener block The proper keydown handler with arrow key navigation is earlier in the code and works correctly.
This commit is contained in:
parent
bbaa6ae841
commit
e6ccd6a408
|
|
@ -1820,15 +1820,7 @@ $allergyStatusNoKnown = in_array($allergyStatusNormalized, ['no known drug aller
|
|||
item.style.fontWeight = '';
|
||||
}
|
||||
});
|
||||
}kup.addEventListener('keydown', function(e) {
|
||||
if (e.key === 'Enter' && btnAdd) {
|
||||
e.preventDefault();
|
||||
dropdown.style.display = 'none';
|
||||
btnAdd.click();
|
||||
} else if (e.key === 'Escape') {
|
||||
dropdown.style.display = 'none';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
lookup.addEventListener('blur', function() {
|
||||
setTimeout(function() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user