Fix closing edit box issue when using fa-pencil as listener (#59)
This commit is contained in:
parent
04b439260c
commit
d354cd967f
@ -33,7 +33,13 @@ if (!document.getElementById(cssId)) {
|
|||||||
|
|
||||||
$(document).on(_CONF_LISTENER_TYPE, function(e) {
|
$(document).on(_CONF_LISTENER_TYPE, function(e) {
|
||||||
$('.issue .attributes .attribute .value').removeClass('edited');
|
$('.issue .attributes .attribute .value').removeClass('edited');
|
||||||
|
// bind click to show edit block if click inside an edit box or on trigger, except button inside edit box
|
||||||
|
if(!$(e.target).closest('a.btn.btn-primary').length &&
|
||||||
|
($(e.target).closest('.' + _CONF_LISTENER_TARGET).length ||
|
||||||
|
$(e.target).closest('span.dynamicEdit').length)
|
||||||
|
) {
|
||||||
|
$(e.target).closest('.value').addClass('edited');
|
||||||
|
}
|
||||||
if ($(e.target).closest('a').length) { return; }
|
if ($(e.target).closest('a').length) { return; }
|
||||||
if ($(e.target).closest('.' + _CONF_LISTENER_TARGET).length) {
|
if ($(e.target).closest('.' + _CONF_LISTENER_TARGET).length) {
|
||||||
// avoid text selection if dblclick
|
// avoid text selection if dblclick
|
||||||
@ -48,9 +54,6 @@ $(document).on(_CONF_LISTENER_TYPE, function(e) {
|
|||||||
sel.empty();
|
sel.empty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// we show the edit box
|
|
||||||
$(e.target).closest('.value').addClass('edited');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user