openforis / sepal

Geographical Data Processing in the Cloud
https://sepal.io/
MIT License
207 stars 46 forks source link

do the str normalization on blur event and not on change #146

Closed 12rambau closed 2 years ago

12rambau commented 2 years ago

It happened to me in a lot of places in SEPAL (names in the backend, recipe tile, asset naming etc...).

As an example let's use the recipe tab title. I right a first title. If I use spaces they are automatically replaced by "_" so I assume that there is a javascript check on this field. Now try to navigate back in your title using the arrow keys, the test will be performed every time the cursor moves and moves back this same cursor to the end making it impossible to navigate in the field using keys.

That does not happen all the time, only when the field is loading. (so start a big recipe if you want to test it).

I think there is something happening on "change" instead of "blur" event, but it could also be concurent JS events....

Let me know if you don't manage to reproduce it

cdanielw commented 2 years ago

Fixed on master.