h5player icon indicating copy to clipboard operation
h5player copied to clipboard

[BUG] Shortcuts are activating when they should not

Open Heck-R opened this issue 3 years ago • 2 comments

  1. 问题描述 Opening down the comment section causes theshortcuts the take effect even when writing a comment down below the video in the comment section Using Ctrl + Space also seems to be buggy here, as it will not disable properly the shortcuts As a result, every time Space, is pressed while writing a comment, the video is stopped / started (the other keys also take effect)

To reproduce:

  • Open a video
  • Open the comment section
  • Type something to the comment input field (It is not required to be signed in)
  1. 出现上述问题的地址 On https://www12.9anime.to/home With every video, eg.: https://www12.9anime.to/watch/fairy-tail-dub.6xl4/ep-1

  2. 你使用的浏览器与浏览器版本信息 Google Chrome (for Windows) Version 87.0.4280.88 (Official Build) (64-bit)

  3. 其他附注信息 It seems to work fine in Firefox

Heck-R avatar Jan 01 '21 20:01 Heck-R

I'd sort this issue to the "page not handled" pile. Unless there's high demand, it will probably stay unsupported.

shortcuts the take effect even when writing a comment down below the video

There is the function isEditableTarget to prevent that. Looks ok. Actually I don't even get the keyboard events to the script when inside textarea. Do you still see this problem?

Using Ctrl + Space also seems to be buggy here, as it will not disable properly the shortcuts

This web page is hacky and doesn't collaborate. In my test the script didn't find the video element, and because of that it ignores the key-presses, such as Ctrl-Space.

JAGulin avatar Jun 30 '21 22:06 JAGulin

I'd sort this issue to the "page not handled" pile. Unless there's high demand, it will probably stay unsupported.

Sad, but I can understand :/

There is the function isEditableTarget to prevent that. Looks ok. Actually I don't even get the keyboard events to the script when inside textarea. Do you still see this problem?

Yes, It is still present for me (with the current newest version 3.3.9) I checked again with both my general setup (some extensions are present) and a fresh chrome installation (with only Tampermonkey and the h5player script). The only additional thing that I noticed is that if there is no AdBlock present, then the video has to be started first (for which one has to click a lot of times on the video due to the popups). Once it has started playing, the problem occurs

This web page is hacky and doesn't collaborate. In my test, the script didn't find the video element, and because of that, it ignores the key-presses, such as Ctrl-Space.

It indeed ignores Ctrl-Space, but not a standalone Space, and other single keys. The part I don't understand though is how can the latter work if the prior does not, due to not finding the video element?

Heck-R avatar Sep 12 '21 11:09 Heck-R