rds1983 / Myra

UI Library for MonoGame, FNA and Stride
MIT License
703 stars 94 forks source link

Textbox KeyDown event fires before updating Text, only on backspace #447

Open NinthDesertDude opened 6 months ago

NinthDesertDude commented 6 months ago

The TextBox control has a KeyDown event and it calls subscribers before Text is updated, but it only has this behavior when pressing backspace (as far as I've seen). Right now I have to manually handle this case.

Expected behavior is that Text should be fully up-to-date before the KeyDown event is invoked. If I typed "cat" and backspace, I would expect "ca" as the value of Text when I'm in the KeyDown event. What I currently get is "cat" still.