Steps to replicate the issue (include links if applicable):
- Have the Reference Tooltips gadget enabled (note that other features like Reference Previews show the same behavior but are not the focus of this ticket)
- Open https://en.wikipedia.org/wiki/Josh_Homme
- Hover over [1]
- Click to play the media
What happens?:
A page with an audio opens and then the audio plays.
What should have happened instead?:
The audio should play in place.
Technical details:
I see this code to be responsible for the initial click handling:
Reference Tooltips, for its part, uses jQuery's .clone() method, more precisely .clone(true), which should clone event handlers as well. But it clones only jQuery's event handlers, not natively (via addEventListener()) added event handlers.
So why not use jQuery, especially given that it is used in the rest of the code? 🤔
(It could be not the whole of the issue.)
Interestingly, the media plays if I first play it in the "References" section, then in the tooltip.

