Textbox.Focused event can fire multiple times, also when already focused

Describe the bug.

  • Textbox.focused() event fire too much, here are when it fire:
    – If click on textbox that is not focus, fire 2 times.
    – If click on textbox that is already focus, for some reason, fire 3 times.
    – When use Textbox:CaptureFocus(), fire one (expect behaviour), but when input some key fire another.
  • Textbox.focused() should only fire once when Textbox state change from not-focus to focused like JavaScript(Demo).

How often does the bug happen (Everytime/sometimes/rarely)?

  • Everytime I use textbox.Focused() and expected it only fire one.

Where does the bug happen (www, gametest, etc) Is it level-specific? Is it game specific?

Would a screenshot or video help describe it to someone?

  • Here use in-game recorder 'cause I’m lazy :zzz:

When did the bug start happening?

  • I don’t know since when, but these unattended relate topics since Jun 2017 and Dec 2017.

Anything else that you would want to know about the bug if it were your job to find and fix it.

  • Check if said textbox is already focused, don’t fire, or fire but also pass a boolean (or input object) parameter to tell if textbox is already focus or not when when event trigger. (Someone may want to use it, IDK :thinking:)
4 Likes

I’m experiencing this issue too. It happens on PC often, but it makes typing on mobile borderline impossible.

REPRO: Use the chat in here: https://www.roblox.com/games/3755790292/Space-Testing

This happens on a Windows 10 PC and iPhone 8.

Again, the bug is more noticeable on mobile.

Cool chat btw If there are at least a bit of background

Bug I Found

Chat message should not send on focus lost
Chat message should not clear on refocus
Sometime textbox not display but accept input
Elevator is kinda bug

1 Like

I am having the same problem, this is really annoying if you are coding a custom chat/texteditor/etc.

And after 1 year Roblox still dont solved this bug. Idk if this is a bug or if this is intentionally, but does this really need to multiple times? This sucks.