Page 1 of 1

Hotkeys Issue with 3.7.0

Posted: November 15th, 2022, 6:12 pm
by dotsam
In @jcfp's 3.7.0 PPA release, the "libjs-jquery-hotkeys" Debian/Ubuntu package is being used in place of the "jquery.hotkeys.min.js" file included in Glitter, but these versions are not compatible, and all Javascript "keydown" events are triggered on any key press. The (thankfully) stops when it gets to the "c" key handler which redirect to the config screen.

It looks like this jquery.hotkeys library has various forks, so it's probably best to stick with the version from source to ensure compatibility.

Re: Hotkeys Issue with 3.7.0

Posted: November 16th, 2022, 4:07 pm
by jcfp
dotsam wrote: November 15th, 2022, 6:12 pmall Javascript "keydown" events are triggered on any key press. The (thankfully) stops when it gets to the "c" key handler which redirect to the config screen.
I don't think I'm seeing any such thing here. For my understanding: with the main sab page open in your browser, any key pressed triggers all shortcuts at once?

What browser is this happening with, and on exactly what os release?

Re: Hotkeys Issue with 3.7.0

Posted: November 16th, 2022, 4:10 pm
by sander
I can neither reproduce on my SAB 3.7.0 on Ubuntu, so can you please explain how you can reproduce

Re: Hotkeys Issue with 3.7.0

Posted: November 16th, 2022, 4:51 pm
by dotsam
Hmmm, interesting. This is running the 3.7.0-0ubuntu1~jcfp1~18.04 package on Debian Buster 10, and I can replicate the issue everywhere I've tested (Safari/Chrome/FireFox on macOS and Edge on Windows 10).

I'll do some further testing and see if I can narrow things down any more.

Re: Hotkeys Issue with 3.7.0

Posted: November 16th, 2022, 4:58 pm
by dotsam
Swapping

Code: Select all

/usr/share/sabnzbdplus/interfaces/Glitter/templates/static/javascripts/jquery.hotkeys.min.js
from a symlink to the shared library to the file from the 3.7.0 source tree immediately fixes the problem.

I'll investigate to see if there are differences between the Ubuntu and Debian versions of libjs-jquery-hotkeys.

Re: Hotkeys Issue with 3.7.0

Posted: November 16th, 2022, 5:08 pm
by dotsam
Yes, digging in deeper, this is a case of Ubuntu downgrading the library to "0.8", but Debian leaving it as the git snapshot from 2013. Probably due to policy and versioning reasons, Ubuntu did not change their version string, so at a glance it looked like both distros had the same version.

I'll look in to local diversion options I have.

Re: Hotkeys Issue with 3.7.0

Posted: November 17th, 2022, 3:00 am
by jcfp
That's some useful extra info there, esp. considering I've yet to update the official package. There's an ancient bug about the ABI mixup in Debian (#740893) which looks like it won't be solved until they start to package both ABIs, giving me sufficient grounds to go with the hotkeys file shipped with sab. PPA will be updated soon.