Skip to content
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

Regression: Versions 2023-11-10+ Have Broken Input Textfields #14988

Open
astroUNL opened this issue Jan 29, 2024 · 2 comments · May be fixed by #18870
Open

Regression: Versions 2023-11-10+ Have Broken Input Textfields #14988

astroUNL opened this issue Jan 29, 2024 · 2 comments · May be fixed by #18870
Assignees
Labels
bug Something isn't working regression Something was working before, but is now broken text Issues relating to text rendering/input

Comments

@astroUNL
Copy link

astroUNL commented Jan 29, 2024

Describe the bug

Starting with 2023-11-10 and up to present (2023-01-29) some input textfields are broken:

  1. The fields do not display text.
  2. The user is unable to enter text.

The particular fields with the problem are created with the createTextField method. However, other text fields created with that method work (such as the degree symbol fields). I have been unable to determine what it is about these fields that cause them to not appear.

ruffle-text-bug

Expected behavior

The textfields should display text and allow input, as shown in the picture.

Content Location

Source SWF:
https://astro.unl.edu/classaction/animations/coordsmotion/altazimuth.swf

Working (2023-11-09, self-hosted):
https://astro.unl.edu/classaction/animations/coordsmotion/altazimuth.html

Broken (2023-11-10, unpkg):
https://astro.unl.edu/classaction/animations/coordsmotion/altazimuth.html?ruffleVer=0.1.0-nightly.2023.11.10

(The URL query string can be used to specify specific versions hosted at unpkg.com/@ruffle-rs, otherwise a locally hosted copy of the 2024-11-09 version of Ruffle is used. Sometimes using unpkg is slow.)

There are other Flash sims with the same problem on this page:
https://astro.unl.edu/animationsLinks.html

Affected platform

Self-hosted version (also desktop version)

Operating system

Windows, macOS

Browser

Chrome

Additional information

I am the author of this SWF and I still have the FLA.

@astroUNL astroUNL added the bug Something isn't working label Jan 29, 2024
@Lord-McSweeney Lord-McSweeney added text Issues relating to text rendering/input regression Something was working before, but is now broken labels Jan 29, 2024
@britt-j
Copy link
Contributor

britt-j commented Aug 17, 2024

The regression seems to have happened in 924e5ef, which was a part of #13923

@britt-j
Copy link
Contributor

britt-j commented Sep 22, 2024

The code responsible for the regression is:

let height = edit_text.requested_height;
edit_text.bounds.set_height(height);
The SWF sets the height of the textfield to 0 on initialization and never explicitly sets it to something else, meaning it'll be reset to zero when the autosize mode is none, which it does set it to.
It seems from my testing that the height should be set to the exterior bounds' height like above:
let height = layout_exterior_bounds.height() + padding;
edit_text.bounds.set_height(height);
But just replacing it with that breaks a test that was matching Flash, so the fix is more complicated than that.

The code in the SWF responsible for these textfields is in Standard Slider V6, and the code updating the field is in the function assigned to updateField

@kjarosh kjarosh self-assigned this Dec 3, 2024
@kjarosh kjarosh linked a pull request Dec 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression Something was working before, but is now broken text Issues relating to text rendering/input
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants