fix clicks on labels

This commit is contained in:
antelle 2017-04-16 11:56:06 +02:00
parent a45ec36d21
commit b771170144
1 changed files with 7 additions and 2 deletions

View File

@ -58,7 +58,8 @@ const FieldViewText = FieldView.extend({
.appendTo(this.labelEl)
.data('action', action)
.on({
mousedown: this.mobileFieldControlClick.bind(this),
mousedown: this.mobileFieldControlMouseDown.bind(this),
click: this.mobileFieldControlClick.bind(this),
touchstart: this.mobileFieldControlTouchStart.bind(this),
touchend: this.mobileFieldControlTouchEnd.bind(this),
touchmove: this.mobileFieldControlTouchMove.bind(this)
@ -205,7 +206,7 @@ const FieldViewText = FieldView.extend({
this.stopListening(Backbone, 'click main-window-will-close', this.fieldValueBlur);
},
mobileFieldControlClick(e) {
mobileFieldControlMouseDown(e) {
e.stopPropagation();
this.stopBlurListener();
const action = $(e.target).data('action');
@ -216,6 +217,10 @@ const FieldViewText = FieldView.extend({
}
},
mobileFieldControlClick(e) {
e.stopPropagation();
},
mobileFieldControlTouchStart(e) {
this.$el.attr('active-mobile-action', $(e.target).data('action'));
},