the event.preventDefault()
doesn't work when I use (keydown.enter)
in template.
This is demo: https://plnkr.co/edit/GZrVt7l6BEO2uHfWFoTQ?p=preview
Please help me.
So just to leave a proper answer here, the correct action to use in this case is event.stopPropagation()
rather than event.preventDefault()
.
event.preventDefault() JSFiddle Example
event.stopPropagation() JSFiddle Example
Both examples contain a small explanation for whats happening with both.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With