drunohazarb / 4chan-captcha-solver

GNU General Public License v3.0
173 stars 3 forks source link

slider steals focus from textarea #33

Open nadomodan opened 1 month ago

nadomodan commented 1 month ago

Minor annoyance: when opening quick reply and the captcha has a slider, adjusting it steals focus from text input area, would be nice if after moving the slider the focus was returned to the textarea.

Yukariin commented 1 month ago

@nadomodan try this version 41da1889d735b221e4702ac25aa7e7fee915f66e

nadomodan commented 1 month ago

I keep getting non-slider captchas so I can't test it properly but I see resp.focus(); in the code, it seems I didn't explain clearly enough.

Intended UX: I press 'q' to open quick reply window and immediately start writing my post, just works most of the time since there's no slider captcha and comment entry field gets autofocused.

What actually happens when there is slider captcha: script moving the slider takes focus away from comment entry so I have to refocus it manually before I can start typing my comment.

Code looks right except the field that is supposed to get focus() is document.querySelector("textarea.field") rather than 'resp'.