Skip to content

Commit

Permalink
#8 Still can't prevent double submit from occurring in Firefox. Avoid…
Browse files Browse the repository at this point in the history
… submit button in form?
  • Loading branch information
nadnoslen committed Mar 19, 2017
1 parent a27034d commit edb7479
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
2 changes: 1 addition & 1 deletion addon/mixins/enter-submits-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default Ember.Mixin.create({
const $form = this.get('_form');
if (Ember.isPresent($form) && this.get('enterWillSubmitForm?')) {
// TODO: trigger before and after?
this.get('_form').trigger('submit');
$form.trigger('submit');
}
return false;
}
Expand Down
19 changes: 3 additions & 16 deletions config/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

module.exports = function(deployTarget) {
var ENV = {
build: {},
build: {
environment: 'production'
},
s3: {
bucket: 'ember-cli-text-support-mixins.cybertooth.io',
filePattern: '**/*.{js,css,png,gif,ico,jpg,map,xml,txt,svg,swf,eot,ttf,woff,woff2,otf,html}',
Expand All @@ -11,21 +13,6 @@ module.exports = function(deployTarget) {
}
};

if (deployTarget === 'development') {
ENV.build.environment = 'development';
// configure other plugins for development deploy target here
}

if (deployTarget === 'staging') {
ENV.build.environment = 'production';
// configure other plugins for staging deploy target here
}

if (deployTarget === 'production') {
ENV.build.environment = 'production';
// configure other plugins for production deploy target here
}

// Note: if you need to build some configuration asynchronously, you can return
// a promise that resolves with the ENV object instead of returning the
// ENV object synchronously.
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/app/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Ember from 'ember';
export default Ember.Route.extend({
actions: {
submit() {
window.alert('The form was submitted.');
window.alert('The form was submitted at ' + new Date().toISOString());
}
}
});

0 comments on commit edb7479

Please sign in to comment.