Skip to content

Commit 9e9cf56

Browse files
author
Nick Hwang
committed
Update tether dep
1 parent 1975bb9 commit 9e9cf56

File tree

4 files changed

+18
-17
lines changed

4 files changed

+18
-17
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
"tests"
2727
],
2828
"dependencies": {
29-
"tether": "~1.0.0"
29+
"tether": "~1.0.2"
3030
}
3131
}

gulpfile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ gulp.task('clean', function() {
3535

3636

3737
// Javascript
38-
gulp.task('js', ['clean'], function() {
38+
gulp.task('js', function() {
3939
gulp.src('./src/js/select.js')
4040
.pipe(babel())
4141
.pipe(umd(umdOptions))
@@ -87,5 +87,5 @@ gulp.task('watch', ['js', 'css'], function() {
8787

8888

8989
// Defaults
90-
gulp.task('build', ['js', 'css'])
91-
gulp.task('default', ['build'])
90+
gulp.task('build', ['js', 'css']);
91+
gulp.task('default', ['build']);

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
],
1212
"scripts": {
1313
"install": "bower install",
14+
"watch": "gulp watch",
1415
"build": "gulp build"
1516
},
1617
"license": "MIT",
@@ -31,6 +32,6 @@
3132
"gulp-wrap-umd": "^0.2.1"
3233
},
3334
"dependencies": {
34-
"tether": "~1.0.0"
35+
"tether": "~1.0.2"
3536
}
3637
}

src/js/select.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function useNative() {
2626
function isRepeatedChar (str) {
2727
return Array.prototype.reduce.call(str, (a, b) => {
2828
return a === b ? b : false;
29-
})
29+
});
3030
}
3131

3232
function getFocusedSelect () {
@@ -106,10 +106,10 @@ document.addEventListener('keydown', (e) => {
106106
case UP:
107107
case DOWN:
108108
select.moveHighlight(e.keyCode);
109-
break
109+
break;
110110
case ENTER:
111111
select.selectHighlightedOption();
112-
break
112+
break;
113113
case ESCAPE:
114114
select.close();
115115
select.target.focus();
@@ -119,13 +119,13 @@ document.addEventListener('keydown', (e) => {
119119
select.open();
120120
}
121121
}
122-
})
122+
});
123123

124124

125125

126126
class Select extends Evented {
127127
constructor(options) {
128-
super(options)
128+
super(options);
129129
this.options = extend({}, Select.defaults, options);
130130
this.select = this.options.el;
131131

@@ -173,9 +173,9 @@ class Select extends Evented {
173173

174174
this.target.addEventListener('click', () => {
175175
if (!this.isOpen()) {
176-
this.target.focus()
176+
this.target.focus();
177177
} else {
178-
this.target.blur()
178+
this.target.blur();
179179
}
180180
});
181181

@@ -213,7 +213,7 @@ class Select extends Evented {
213213

214214
// Built-in selects don't propagate click events in their drop directly
215215
// to the body, so we don't want to either.
216-
e.stopPropagation()
216+
e.stopPropagation();
217217
});
218218

219219
this.drop.addEventListener('mousemove', (e) => {
@@ -327,7 +327,7 @@ class Select extends Evented {
327327
// Clicking target
328328
if (event.target === this.target ||
329329
this.target.contains(event.target)) {
330-
return
330+
return;
331331
}
332332

333333
this.close();
@@ -441,7 +441,7 @@ class Select extends Evented {
441441

442442
selectOption(option) {
443443
if (this.isOpen()) {
444-
this.highlightOption(option)
444+
this.highlightOption(option);
445445
this.scrollDropContentToOption(option);
446446
} else {
447447
this.pickOption(option, false);
@@ -497,7 +497,7 @@ class Select extends Evented {
497497
const {scrollHeight, clientHeight, scrollTop} = this.content;
498498
if (scrollHeight > clientHeight) {
499499
const contentBounds = getBounds(this.content);
500-
const optionBounds = getBounds(option)
500+
const optionBounds = getBounds(option);
501501

502502
this.content.scrollTop = optionBounds.top - (contentBounds.top - scrollTop);
503503
}
@@ -515,7 +515,7 @@ class Select extends Evented {
515515
setTimeout(() => {
516516
this.close();
517517
this.target.focus();
518-
})
518+
});
519519
}
520520
}
521521

0 commit comments

Comments
 (0)