Notice: We are now selling NEW Gelbooru Merch~! Domestic shipping is free on all orders! Do you have an artist tag on Gelbooru? Let us know so we can properly credit you!

Ticket Information - ID: #1084

ID:Category:SeverityReproducibilityDate SubmittedUpdated By:
0001084Bug Reportingnormalalways01/23/21 11:58AMlozertuser
Assigned to:geltas
View StatusPublic
Target Version:N/A
Summary:Importing jquery in a userscript on gelbooru using Greasemonkey on Pale Moon causes keyboard to stop working correctly
Description:Steps to reproduce:

1. Install Greasemonkey on latest Pale Moon.
2. Create a barebone script that imports jquery, like this:
// ==UserScript==
// @name test
// @namespace *
// @include*
// @grant none
// @require
// ==/UserScript==
3. Load any post.
4. Press any key.

The result of this is that regardless of what was pressed (and this includes modifiers like Alt, Ctrl, Shift and Win), the page immediately (that is, without waiting for the key to be released) scrolls to the top and the key gets swallowed (even if it had a modifier like Ctrl pressed, so e.g. Ctrl+T doesn't work). If the search field has been focused, all keys get treated as enter instead (that is, the text currently present there gets searched). This happens on a clean profile with no addons other than GM (no adblock either), but doesn't happen on Firefox or Chrome. Gelbooru is the only site this happens on. This started happening fairly recently, probably this month (not 100% sure though). Non-post pages work normally.
Additional Info:
Jerl replied at 2021-01-23 22:03:51
That's a Greasemonkey or Pale Moon issue, not a Gelbooru one. You will need to determine which of these is the culprit and report the issue to them.

Jerl replied at 2021-01-23 22:07:20
Additionally: could not reproduce with Firefox 84.0.2 and Tampermonkey.

Dariush replied at 2021-01-24 07:27:31
Hm, I don't see how it can be their fault if it only happens on one subsection of a single site. I think they will very likely say "the site has some funky JS running, not our fault".

(And I did say it doesn't happen on Firefox)

BTW, I just dug a bit deeper and here's what I found:

1. Deleting #translate from DOM causes any key to scroll not to the top of the page, but only to the top of the image, and ctrl+combos begin working. However, ctrl+combos still don't work if the search field is focused.
2. Deleting .searchList causes enter to no longer trigger searching when search field is focused (nothing is still getting input into it, though).

So it appears to be several different bugs rolled into one or something.

Dariush replied at 2021-01-24 07:31:47
Er, typo in #2: I meant to say "causes every key, including enter, to no longer trigger searching".

Jerl replied at 2021-01-24 12:02:29
On our end, if it's only happening in one niche browser/extension combination, "the browser/extension has some funky code running, not our fault".

lozertuser replied at 2021-01-24 13:56:11
Try disabling jquery-hotkeys from loading on our site. This is not a bug with out software, but with yours.