Open ghost opened 9 years ago
For me the "textbox" (actually the whole comments area once the comment textbox loads) eats the keydown events before they even get to the shortcut handler. But seems that checking for body might be enough.
Note that the change by YouTube of their comments section only effects replies. Posting an original comment always works, and the original comment box is still a "TEXTAREA", and it does consume the event, but the error occurs when attempting to reply to a comment, then it seems ev.target.tagName
== "DIV", but checking for body may be a more suitable or stable workaround, a little more general and future proof.
I replaced
if(ev.target.tagName == "TEXTAREA" ||
(ev.target.tagName == "INPUT" && ev.target.type != "button"))
return;
with
if(ev.target.tagName != "BODY") return;
and it works.
Thank you
https://github.com/jackun/VLCTube/commit/e994c314284c2c509dca5cd64318434b6db5b893 Does this break chatting? Commenting seemed to work for me, but as usual...
No problems for me
This does make space bar pause when I reply to a comment. I made a comment on a video, thumbed up another comment and tried to reply to it, but space bar made me start chopping the video.
ok i can confirm that space bar pauses and unpauses the video regardless of focus or not. so i would assume typing a comment would result in constant pausing and unpausing with each spacebar press.
"clarification" by focus i meant focus on player not the window itself
When I try to reply to comments, the space bar activates the player. It seems YT has redone their comment js and now the comment section is a DIV. I fixed this issue by changing line 1137 from
to