Skip to content

Commit

Permalink
Fix 'oninput' not properly working in < IE9
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyvankooten committed Feb 12, 2015
1 parent 695d59d commit 7f65b0e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
14 changes: 10 additions & 4 deletions assets/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,20 +140,20 @@
// do nothing if no fields are missing
if($.isEmptyObject(missingFields)) {
$missingFieldsNotice.hide();
return false;
return;
}

// show notice
$missingFieldsList.html('');
for( var key in missingFields ) {
var field = missingFields[key];
var $listItem = $("<li />");
var $listItem = $("<li></li>");
$listItem.html( field.name + " (<code>" + field.tag + "</code>)");
$listItem.appendTo( $missingFieldsList );
}

$missingFieldsNotice.show();
return true;
return;
}

// set the fields the user can choose from
Expand Down Expand Up @@ -593,7 +593,13 @@
$("#mc4wp-fw-add-to-form").click(addCodeToFormMarkup);

// Validate the form fields after every change
$formMarkup.on('input', checkRequiredFields);
$formMarkup.bind({
'input': function() {
$formMarkup.unbind('keydown');
checkRequiredFields.call(this);
},
'keydown': checkRequiredFields
});

// init
setMailChimpFields();
Expand Down
2 changes: 1 addition & 1 deletion assets/js/admin.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ The MailChimp for WordPress plugin is translated into the following languages.

- English (en_US) - [Danny van Kooten](https://dannyvankooten.com)
- Dutch (nl_NL) - [Danny van Kooten](https://dannyvankooten.com)
- German (de_DE) - [Stefan Oderbolz](http://metaodi.ch/)
- Spanish (es_ES) - [Paul Benitez ](http://www.administrandowp.com/) & [Enrique Pinto](http://www.thehivecluster.com/en)
- Brazilian (pt_BR) - [Felipe Scuissiatto](http://www.evonline.com.br/)
- German (de_DE) - [Jochen Gererstorfer](http://slotnerd.de/)
Expand Down

0 comments on commit 7f65b0e

Please sign in to comment.