Skip to content
Permalink
Browse files

Removed spider link hack, prevent bubbling of enter keypress

  • Loading branch information...
dvdbng committed Feb 29, 2016
1 parent 46ecc32 commit 986db9900e6960f99caa881b6052ce6178e7a590
@@ -18,6 +18,9 @@ export default Ember.Component.extend({
});
Ember.run.next(this, this.setInputFocus);
}
// Prevent default / bubbling of keypress event when pressing enter
Ember.$('#' + this.get('inputId'))
.keypress((e) => e.which !== 13);
},

inputId: Ember.computed('elementId', function() {
@@ -55,13 +55,6 @@ export default Ember.Component.extend({
return true;
},

loadSpider(spider) {
// Using link-to was problematic because it interpreted an enter in
// the input field as intention to follow the link (rather than
// saving the value)
this.get('routing').transitionTo('projects.project.spider', [spider], {}, true);
},

saveSpiderName(spider) {
// HACK: Renaming the spider will change it's ID, changing the ID
// of a record is not supported in Ember data, so we return a new

0 comments on commit 986db99

Please sign in to comment.
You can’t perform that action at this time.