Skip to content

Commit

Permalink
Merge pull request #2 from cormacmccarthy/jmgekeler-W-3550658
Browse files Browse the repository at this point in the history
(W-3550658) makes code a little more redible
  • Loading branch information
jmgekeler authored Dec 12, 2016
2 parents 012cd96 + 1cc13ba commit 3fa4eb7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions grunt/tasks/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ module.exports = function test (grunt) {
grunt.registerTask('resetdist', 'resets changes to dist to keep them from being checked in', function resetdist () {
// default resetdist to true... basically.
if (typeof grunt.option('resetdist') === 'undefined' || grunt.option('resetdist')) {
var exec = require('child_process').exec;
exec('git reset HEAD dist/*');
exec('git checkout -- dist/*');
var exec = require('child_process').execSync;
exec('git reset HEAD dist');
exec('git checkout -- dist');
}
});
};
7 changes: 4 additions & 3 deletions js/pillbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,11 +357,12 @@
var self = this;
var text = self.options.cleanInput(this.$addItem.val());
var isFocusOutEvent = e.type === 'focusout';
var addOnFocusOut = (isFocusOutEvent && text.length > 0);

var blurredAfterInput = (isFocusOutEvent && text.length > 0);
// If we test for keycode only, it will match for `<` & `,` instead of just `,`
// This way users can type `<3` and `1 < 3`, etc...
if ((this.acceptKeyCodes[e.keyCode] && !isShiftHeld(e)) || addOnFocusOut) {
var acceptKeyPressed = (this.acceptKeyCodes[e.keyCode] && !isShiftHeld(e));

if (acceptKeyPressed || blurredAfterInput) {
var attr;
var value;

Expand Down

0 comments on commit 3fa4eb7

Please sign in to comment.