Closed babaissarkar closed 1 week ago
This reminded me of #1239 - this is the first place I've seen that actually seems to allow for switching using Tab...
Adding some context from Discord. @babaissarkar debugged and discovered this was due to a handler being called twice on tab down, resulting in the skip-to-next-widget code being called twice.
Game and System Information
Description of the bug
Pressing Tab moves focus to the wrong widget in tab order. Same with Shift+Tab
Steps to reproduce the behavior
This is just an example and the problem happens also with any dialog that has tab ordered text boxes, such as the Time Schedule Editor. Also happens with Shift+Tab.
Expected behavior
Focus should go to the Name textbox, in other word, the one next in the tab order when Tab is pressed. Similarly should go the previous textbox in tab order when Shift+Tab is pressed, which is the Description textbox in this case.
Additional context
Debugging shows that the handler here is related: https://github.com/wesnoth/wesnoth/blob/36146c5c6c48b44c79d0bf4bbfcbd9886f68525a/src/gui/widgets/window.cpp#L1287