I'm trying to implement a simple textbox in a backbone.js application. The user will enter a price in a textbox and hit enter. When the enter key is pressed I get the following error and the page redraws itself. It's as if I hit enter in the url textbox in the browser itself.
I'd like to disable this (i.e. perhaps ev.preventDefault();) but I'm not clear on how to stop this behavior. When I navigate back to the part of the application that now has the textbox the keydown event appears to be hijacked but at least the page doesn't redraw.
background.js:153 Uncaught TypeError: Cannot read property 'onUpdated' of undefined(anonymous function) @ background.js:153 finder.groups.min.js:213Thumbnails setupQuery called: undefined
Below is line 153 in background.js:
chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
if ( changeInfo.status == "complete" ) {
if (isAsanaUrl(tab.url) == true) {
goGetIt();
}
}
});