app/assets/javascripts/slices/app/views/token_field_view.js in slices-1.0.4 vs app/assets/javascripts/slices/app/views/token_field_view.js in slices-1.0.5
- old
+ new
@@ -22,11 +22,12 @@
events: {
'keydown' : 'onKey',
'keypress' : 'onKey',
'click .del' : 'onClickDel',
- 'click .option' : 'onClickOption'
+ 'click .option' : 'onClickOption',
+ 'click' : 'onClick'
},
className: 'token-field',
template: Handlebars.compile(
@@ -99,11 +100,11 @@
this.focus();
},
delayedCapture: _.debounce(function() {
this.capture();
- }, 750),
+ }, 1500),
focusOrRemoveLastToken: function(e) {
var focusedToken = this.$el.find('.token.focus');
if (focusedToken.length) {
@@ -194,9 +195,14 @@
this.delayedCapture();
} else {
e.preventDefault();
this.focusOrRemoveLastToken();
}
+ },
+
+ onClick: function(e) {
+ this.render();
+ this.focus();
},
onClickDel: function(e) {
e.preventDefault();