ruffle-rs / ruffle

A Flash Player emulator written in Rust
https://ruffle.rs
Other
15.37k stars 793 forks source link

Text fields don't lose focus #17064

Closed teampanfu closed 1 month ago

teampanfu commented 1 month ago

Describe the bug

Normally, the focus should move away from the text field when you click somewhere else. This is not the case in Ruffle.

The code:

pTextField.addEventListener(FocusEvent.FOCUS_OUT, handleFocusOut);

handleFocusOut would remove the background which is shown when the text field is focused.

Aufzeichnung2024-07-09221731-ezgif com-video-to-gif-converter

Expected behavior

This would be the expected result as it occurs in Flash Player:

Aufzeichnung2024-07-09222049-ezgif com-video-to-gif-converter

Content Location

The bug can be reproduced on our website. An account is required.

Click on your avatar and switch to the next page of your profile in the pagination, there are the text fields.

Affected platform

Self-hosted version

Operating system

Windows 11

Browser

Google Chrome 126.0.6478.127

Additional information

No response

kjarosh commented 1 month ago

If the page consists of multiple Ruffle instances then https://github.com/ruffle-rs/ruffle/pull/17051 should fix it.

However, if it's not the case I'm afraid we would need to debug the issue which requires access to the page or sharing page sources to set up the page locally.

I advise waiting for https://github.com/ruffle-rs/ruffle/pull/17051 (because it will get merged soon), and then retesting.

teampanfu commented 1 month ago

Only one instance, but I'll test it again after this PR is merged. Maybe I can set up a simple SWF for testing.

kjarosh commented 1 month ago

So I've managed to reproduce the issue on your page (thanks @n0samu!), and it seems that it may be fixed by https://github.com/ruffle-rs/ruffle/pull/16581, so I'd wait for that PR and retest it after merge.

teampanfu commented 1 month ago

I just tested it and it works. Thank you!