Debugify

Debugify

16M Downloads

[Bug] MC-147605 makes dangerous assumptions and causes issues with modded text widgets

emilyploszaj opened this issue ยท 4 comments

commented

This does not follow a template, however it affects all versions of Debugify, and is a more general problem than a particular issue.

The bugfix implementation for MC-147605 is questionable. As it stands, this bug hardly affects vanilla, but the change of focusing behavior seriously affects mods who expected and have tested with vanilla. One of the base assumptions made is that no text widget will ever want to unfocus itself (your overrides ignore all requests to release focus), which can cause serious issues for mods' text fields that capture key input, such as EMI, JEI, and certainly others. A simple way to reproduce this is by making a text widget that unfocuses itself when pressing escape. This will cause entering the text field to be permanent, and leaving the gui impossible.

This is the root cause to #109 and #74
I'm not sure how you should properly go about solving this. Text input in Minecraft is quite immature and handled differently all over the place, I don't know if you're going to find a solution that won't break something, and its effects on vanilla are almost negligible. I've seen mezz suggest a default off for this fix, could be useful as well.

commented

I do not intend to ignore requests to release focus.

commented

(your overrides ignore all requests to release focus)

Could you show me where there are requests to focus? The code should only match to what the setfocus methods of TextFieldWidget never ignore.

commented

https://github.com/isXander/Debugify/blob/1.19/common/src/main/java/dev/isxander/debugify/mixins/basic/client/mc147605/TextFieldWidgetMixin.java#L32 if you call this method with false, it will do nothing, and if you're focused, you will remain focused indefinitely. As it stands once one widget is focused, the only way to unfocus it is to focus another text widget.

commented

(: