Subject: bug#70086: Mouse clicks in tab-bar don't call commands bound in keymap properties

From: Juri Linkov <[email-masked]>
Date: Sun, 05 May 2024 09:49:20 +0300

>> Could you please distill this example into a self-contained test case
>> like you did the previous time, that helped a lot.
>
> Ok, the following code seems to demonstrate the problem, with your patch
> applied to tab-bar.el:

Thanks, now the problem is clear.  Your code also demonstrates that
'C-h k mouse-1' shows a wrong binding.

> Enable both tab-bar-ecm-mode and tab-bar-ecm-mode2.  Then you'll see that,
> regardless of which lighter is clicked in the tab-bar, the lighter for the
> mode that was activated last catches the mouse clicks for both lighters.

To get a binding at the click location in the string tried to use posn-col-row,
but it returns a wrong coordinate since it doesn't take into account
line-spacing properties.