CreativeMD / LittleFrames

GNU Lesser General Public License v3.0
12 stars 7 forks source link

UrlTextField is limited to 128 chars but URLs are limited to 2048 #54

Closed SrRapero720 closed 1 year ago

SrRapero720 commented 1 year ago

This causes a curious issue. paste a URL forces to UrlTextField to handle the entire URL. but when Gui is re-opened cuts the URL and breaks the picture (couln't load)

suggestion: increase char limit to 2048 put text and after changes limit doesn't works, set text on constructor cuts the URL before set new input limit so is necesary to do the change on UrlTextField class

https://github.com/CreativeMD/LittleFrames/blob/75aee9d6f4429d27960f3581d6520ab358e60732/src/main/java/team/creative/littleframes/client/gui/GuiUrlTextfield.java#L19

removing argument "text" and adding another line with

        setMaxStringLength(2048);
        setText(text);
CreativeMD commented 1 year ago

Thank you very much for all your help! Have not been aware of it.