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

From: Juri Linkov <[email-masked]>
Date: Fri, 03 May 2024 09:18:25 +0300

> For example, given this value for global-mode-string:
>
> ((tab-bar-ecm-mode
>   (:propertize tab-bar-ecm-lighter keymap
> 	       (keymap
> 		(tab-bar keymap
> 			 (mouse-1 lambda
> 				  (&rest _)
> 				  (interactive)
> 				  (message "tab-bar-ecm-lighter clicked with mouse-1"))))))
>  (listen-mode
>   (:propertize listen-mode-lighter keymap
> 	       (keymap
> 		(tab-bar keymap
> 			 (down-mouse-3 . listen-pause)
> 			 (down-mouse-2 . listen-pause)
> 			 (down-mouse-1 . listen-pause)
> 			 (mouse-3 . listen-pause)
> 			 (mouse-2 . listen-pause)
> 			 (mouse-1 . listen-pause))
> 		(mode-line keymap
> 			   (mouse-1 . listen-pause))))))
>
> When I click on the text rendered by listen-mode-lighter, the lambda from
> the tab-bar-ecm-lighter keymap intercepts the mouse-1 event and prints the
> message rather than calling the listen-pause function.

Could you please distill this example into a self-contained test case
like you did the previous time, that helped a lot.