Closed dgdsp closed 8 years ago
culprit: https://github.com/getkirby/panel/blob/develop/assets/js/src/app.js#L36
monkey patch:
// event delegation for all clicks on links
$(document).on('click', 'a', function(e) {
var link = $(this);
var href = link.attr('href') || "";
// medium-editor anchor preview
if(link.is('.medium-editor-toolbar-anchor-preview-inner')) {
return false;
} else if(link.is('[data-dropdown]') || href.match(/^#/)) {
return true;
} else {
if(link.is('[data-modal]')) {
app.modal.open(link.attr('href'));
return false;
} else if(link.is('[target]')) {
return true;
} else {
app.content.open(href);
return false;
}
}
});
fixed in dev-branch
unfortunately the intended behaviour of anchors and anchor previews is broken in 2.2.2.: links are opened directly instead of being intercepted by medium-editor, resulting in a barely usable anchor button.