I have a project with a lot of libraries, like jQuery, Kendo and AngularJS. After an update with many commits textarea stopped breaking to a new line by [Enter] press. Maybe, somewhere the event has been unbound or a library interrupts. I tried to get listeners for the object by JQuery.data(element), but it got undefined. How can I debug it?
Advertisement
Answer
Found a problem. Somewhere in the code:
$(document).keypress(function (e) {
if (e.which == 13) {
e.preventDefault();
}
});
It was used to catch ‘Enter’ press, that led to another page, because menu element was focused on start.