Fix for clicking on notes.

This fixes an issue where when clicking on names or note links within
notes it only taking you to the thread view. It also allows you to
perform text selection too.
This commit is contained in:
Thomas Mathews 2023-03-26 18:30:16 -07:00
parent a8b3d5986b
commit 36149d9db0
3 changed files with 9 additions and 3 deletions

View file

@ -683,6 +683,12 @@ function onclick_toggle_cw(ev) {
function onclick_any(ev) {
let el = ev.target;
// Check if we have a selection and don't bother with anything
let selection = document.getSelection();
if (selection && selection.isCollapsed == false &&
view_get_timeline_el().contains(selection.anchorNode)) {
return;
}
let action = el.getAttribute("action");
if (action == null && el.tagName != "A") {
const parent = find_parent(el, "[action]");