this.container = $("#linkeditor-panel-layers");
this.maskCheckEvents = false;
- $(document).on('change', "#linkeditor-panel-layers :checkbox", function () {
+ $(document).on('click', "#linkeditor-panel-layers label", function (e) {
if ($this.maskCheckEvents) {
- return;
+ return false;
}
- var link = $('#linkeditor-links [fb-uid="' + $(this).attr('name') + '"]');
- if ($(this).prop('checked')) {
- $this.linkeditor.links.selectLink(link);
- } else {
- $this.linkeditor.links.deselectLink(link);
+ let uid = $(this).find('input').attr('name');
+ var link = $('#linkeditor-links [fb-uid="' + uid + '"]');
+ if (!e.ctrlKey) {
+ $this.linkeditor.links.deselectAllLinks();
}
+ $this.linkeditor.links.selectLink(link);
$this.linkeditor.form.updateLinkForm();
+ return false;
});
$(document).on('click', '#linkeditor-panel-layers label span.uid', function () {
navigator.clipboard.writeText($(this).attr('fb-uid'));
- let tippy=$(this).data('tippyinstance');
+ let tippy = $(this).data('tippyinstance');
console.log(tippy);
tippy.setContent(TRANSLATIONS.id_copied);
tippy.show();