lunatic-gh / optionfocusfix Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
First of all, i'm fully aware of this Issue. I'm going to do some explaining here, but please do not open any issue regarding this "bug".
There's a bug causing text-widgets of external mods to behave in a weird way, where they unfocus as soon as the mouse-button is released. THIS IS INTENDED BEHAVIOR!
The Reason this happens is that those text-fields have nothing to do with vanilla widgets. They entirely use their own base, with their only "connection" to the game being that they extend something like "Renderable" or "Widget".
What this mod does is injecting into the "ParentElement" class, listening for "mouseClicked" and "mouseReleased".
"But wait, if it ignores text fields, why does this happen?"
As mentioned above, a lot of modded widgets use their own base. They don't have anything in common with the vanilla "TextFieldWidget", usually only extending "Widget" or "ClickableWidget" or something similar.
This way, it is basically impossible for me to keep them apart from basically every other widget in the game.
The only mod i was able to verify this on by now is "Reeses Sodium Options" for the Search-Field, but there are very likely a lot more that i don't know of.
"What is the Alternative?"
There is really only one, which i really don't want do do. The only option is to manually add support for every single mod's widgets that this happens on.
This would Require an update every time a new mod with such behavior comes out, or a mod adds a new type of widget.
It should be obvious why this is not reasonable.
For now i'm going to "ignore" this. As said, there is no other option.
If in the future there comes something up, or you have an idea about this, feel free to comment on this issue with ideas.
While using this mod, certain menus such as the gamerules menu still have the 1.19.4 bug.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.