raiguard / QuickItemSearch

Factorio mod - quickly search for items in your inventory or connected logistic network.
MIT License
3 stars 1 forks source link

Using tab to select the nav bar doesn't cancel selection #3

Closed JanSharp closed 4 years ago

JanSharp commented 4 years ago

To reproduce:

making a pattern with multiple selections: image

error caused by overlap: image

JanSharp commented 4 years ago

Curious, i don't know how to add the bug tag. I assume i can't add it then, only moderators or so. Or i'm very blind.

JanSharp commented 4 years ago

The essencially same issue also happens when in the request gui. So another reproduction is:

raiguard commented 4 years ago

Unfortunately there is no way to tell when tab is pressed when your inside a textfield, so there is no way for me to just straight-up prevent it, especially with multiplayer latency. So what I did instead was add logic to handle if the textfield confirmed or the text changes when it's not supposed to, so it can reset the state and prevent crashes.

Basically, just don't use tab. Use enter and escape instead. ;)

JanSharp commented 4 years ago

Yea, i figured it was because tab doesn't raise events (i think). I'm just so used to using tab.

So that fix is what i expected.