mirror of https://github.com/keeweb/keeweb.git
fix mobile bugs
This commit is contained in:
parent
0c42629f32
commit
8ee596b067
|
@ -163,9 +163,6 @@ Tip.hideTips = function(container) {
|
|||
};
|
||||
|
||||
Tip.hideTip = function(el) {
|
||||
if (!Tip.enabled) {
|
||||
return;
|
||||
}
|
||||
if (el._tip) {
|
||||
el._tip.hide();
|
||||
}
|
||||
|
|
|
@ -59,7 +59,6 @@ const FieldViewText = FieldView.extend({
|
|||
.data('action', action)
|
||||
.on({
|
||||
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)
|
||||
|
@ -217,10 +216,6 @@ const FieldViewText = FieldView.extend({
|
|||
}
|
||||
},
|
||||
|
||||
mobileFieldControlClick(e) {
|
||||
e.stopPropagation();
|
||||
},
|
||||
|
||||
mobileFieldControlTouchStart(e) {
|
||||
this.$el.attr('active-mobile-action', $(e.target).data('action'));
|
||||
},
|
||||
|
|
|
@ -45,6 +45,9 @@ const FieldView = Backbone.View.extend({
|
|||
|
||||
fieldLabelClick: function(e) {
|
||||
e.stopImmediatePropagation();
|
||||
if (this.preventCopy) {
|
||||
return;
|
||||
}
|
||||
const field = this.model.name;
|
||||
let copyRes;
|
||||
if (field) {
|
||||
|
@ -94,6 +97,7 @@ const FieldView = Backbone.View.extend({
|
|||
this.$el.addClass('details__field--edit');
|
||||
this.startEdit();
|
||||
this.editing = true;
|
||||
this.preventCopy = true;
|
||||
},
|
||||
|
||||
endEdit: function(newVal, extra) {
|
||||
|
@ -101,6 +105,7 @@ const FieldView = Backbone.View.extend({
|
|||
return;
|
||||
}
|
||||
this.editing = false;
|
||||
setTimeout(() => { this.preventCopy = false; }, 300);
|
||||
let textEqual;
|
||||
if (this.value && this.value.isProtected) {
|
||||
textEqual = this.value.equals(newVal);
|
||||
|
|
Loading…
Reference in New Issue