Open wisp3rwind opened 7 years ago
Thanks for the report!
This bug exists because the play button is implemented as a div wrapped within an anchor element: <a><div></div></a>
. When Saka Key dispatches the click event, it dispatches the click to the anchor, not the div. But the event listener that pauses/plays is attached to the div, not the anchor.
The fix is as follows: If A) a parent element and one of its descendants are both clickable and B) the descendant fills up the parent, then assign the hint only to the descendant.
The current logic assigns the hint to the parent. I'm not going to fix this right away, as I intend to replace the logic for finding hints with VimFx's algorithm.
Alright, thanks for the response and the extension in general. I'm very much looking forward to more of VimFx' functionality being 'restored' here :)
The reason VimFx is able to click this “button” is because it uses an old Firefox API for checking if elements have click listeners (added using element.addEventListener('click', ...)
). One would have to hack .addEventListener
of all pages in order to do something similar in a WebExtension. See also https://github.com/akhodakivskiy/VimFx/issues/672 and https://github.com/akhodakivskiy/VimFx/pull/676.
Oh I see now. Thanks for the explanation. Looks like I'll have to investigate either monkeypatching EventTarget.addEventListener or see how cVim and Vimium do it.
Vimium has an open PR for hacking addEventListener
: https://github.com/philc/vimium/pull/1859
As the title says,
f
+ selecting the play button (it does have a link hint) on e.g. https://whitneychicago.bandcamp.com/album/you-ve-got-a-woman-lion-cover-b-w-gonna-hurry-as-slow-as-i-can-dolly-parton-cover has no effect, i.e. does not play the song.This applies to both up-to-date Firefox and Chromium with v1.23.1. If I can help debugging this, please tell me how.