diff --git a/ivette/src/frama-c/plugins/eva/valuetable.tsx b/ivette/src/frama-c/plugins/eva/valuetable.tsx index 0b240e28797acbbc9c7586ac4fe34bdf2c27de5b..45208eaa721530a845e307c72abcc840de68b8f0 100644 --- a/ivette/src/frama-c/plugins/eva/valuetable.tsx +++ b/ivette/src/frama-c/plugins/eva/valuetable.tsx @@ -648,15 +648,9 @@ async function FunctionSection(props: FunctionProps): Promise<JSX.Element> { const displayTable = folded || !(before || after) ? 'none' : 'table'; type RowHandler = React.MouseEventHandler<HTMLTableRowElement>; const onClick: (c: callstack) => RowHandler = (c) => (event) => { - const target = event.currentTarget; - const selection = document.getSelection(); - const length = selection?.toString()?.length ?? 0; - const container = selection?.anchorNode; - const row = container?.parentElement?.parentElement?.parentElement; - if (target !== row || length === 0) + const elt = document.elementFromPoint(event.clientX, event.clientY); + if (elt?.localName !== 'span') props.selectCallstack(isSelectedCallstack(c) ? 'Summary' : c); - if (target !== row && target.parentElement === row?.parentElement) - selection?.collapse(null); }; /* Computes the relevant callstacks */