Subject: Re: bug#53322: 28.0.91; "C-h c" errors out for menu-bar clicks

From: Eli Zaretskii <[email-masked]>
Date: Mon, 17 Jan 2022 20:48:35 +0200

> Date: Mon, 17 Jan 2022 20:03:05 +0200
> From: Eli Zaretskii <[email-masked]>
> 
> 
>   C-h c
>   Click File->Open File from the menu bar
> 
> This signals an error:
> 
>   posn-set-point: Position not in text area of window
> 
> Same thing happens with "C-h k".

Juri, this is a direct consequence of your changes in commit 8230a47:

  commit 8230a47ecc8c11f518ee20a9055c0c27339a6730
  Author:     Juri Linkov <[email-masked]>
  AuthorDate: Wed Dec 1 19:36:00 2021 +0200
  Commit:     Juri Linkov <[email-masked]>
  CommitDate: Wed Dec 1 19:36:00 2021 +0200

      * lisp/help.el (help--analyze-key): Prefer posn-set-point over mouse-set-point

      * lisp/help.el (help--analyze-key): Use posn-set-point instead of
      mouse-set-point that runs the hook mouse-leave-buffer-hook via
      mouse-minibuffer-check.  Using posn-set-point also unnecessitates
      extra conditions added in bug#51421.

The sad part is that the "unnecessary extra conditions" added in
bug#51421 fixed the very problem that your change now reintroduced.

Did you test that change with the original recipe which was solved in
bug#51421?  Did it work for you back then?

Any suggestions for how to fix this regression, except by reverting
the above commit?