New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tab completion only shows a single result #3319

Nareese opened this Issue Dec 4, 2018 · 1 comment


None yet
3 participants

Nareese commented Dec 4, 2018

A recent change to resolve input being overwritten (#3311) has moved the setTextareaValue function from the chat_tab_completion module to twitch.setInputValue. The two are functionally identical, except for one change in the new version: a call to $inputField.val(msg).focus(), which triggers the onFocus handler in chat_tab_completion and unfortunately resets the tabTries back to -1 which causes additional tabs to just generate the completion list over again and then show the first result again.

The obvious fix for this is to just remove the onFocus handler, but I don't know whether it has an important reason for being there for the non twitch.setInputValue case. I commented it out and tested with it for a bit, and everything I tried seemed OK, but maybe there's something that I'm not spotting. Another option if the onFocus handler does need to be there for some reason I'm not seeing is to preserve this.tabTries in a temp variable after the inc/dec and bounds checking at the top, and re-assign it back to this.tabTries after the call to twitch.setInputValue at the bottom, but that seems like an ugly hack to me.

Both of these solutions appear on casual testing to fix the issue without breaking anything else, but I'm not sure which is best, or least bad, anyway.


This comment has been minimized.

thinkpad4 commented Dec 4, 2018

Noticed this today, glad @Nareese is on the case

@night night added the bug label Dec 4, 2018

@night night closed this in 9b54e60 Dec 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment