OpenRailAssociation / osrd

An open source web application for railway infrastructure design, capacity analysis, timetabling and simulation
https://osrd.fr
457 stars 42 forks source link

stdcm: Selecting suggestion doesn't filled up correctly input field #9308

Open woshilapin opened 4 days ago

woshilapin commented 4 days ago

What happened?

When I type a text searching for a intermediate Operational Point, I get some suggestions. In this case, typing "Le Pon" propose a suggestion "LPT Le Pontet". If I select it (with mouse or with keyboard), the input field is filled up with "Le Pontet", not what I selected which is "LPT Le Pontet". If I click again on the on the right of the input field, and click again on the suggestion (or even if I click on the side to close the suggestions' popup), the input field is not filled up with "LPT Le Pontet".

What did you expect to happen?

I expect the field to be filled up with what is shown and selected in the suggestion popup.

How can we reproduce it (as minimally and precisely as possible)?

https://github.com/user-attachments/assets/3b21f440-5440-40ce-8674-4eb18acf7c3f

On which environments the bug occurs?

Recette (SNCF)

On which browser the bug occurs?

Firefox

OSRD version (top right corner Account button > Informations)

96c960e (editoast, core) but nothing shown for front

woshilapin commented 4 days ago

Might be related to https://github.com/OpenRailAssociation/osrd/issues/9296 🤷

axrolld commented 1 hour ago

IMO (agreed with @thibautsailly ) the trigram should not be displayed once the field is selected. It's here in the suggestions because it can be an input but it should remain after the selection. We could maybe make this clearer i think. But in that case the bug is actually the second part : clicking in then out of the combo box make the trigram visible. I'm postponing this until we set this clear.