Skip to content

Commit

Permalink
Removed spider link hack, prevent bubbling of enter keypress
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdbng committed Feb 29, 2016
1 parent 46ecc32 commit 986db99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 3 additions & 0 deletions portiaui/app/components/buffered-input.js
Expand Up @@ -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() {
Expand Down
7 changes: 0 additions & 7 deletions portiaui/app/components/project-structure-listing.js
Expand Up @@ -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
Expand Down

0 comments on commit 986db99

Please sign in to comment.