Open agausmann opened 5 months ago
hmm, that's a bit odd because it doesn't send a request whenever the input changes, only once the user loses focus of the text input.... at least in chrome. it appears that in firefox requests to the api are constantly flooded from the moment the app is opened which is definitely not correct lol.
i don't believe an apply or cancel button is necessary in this scenario, nor wanted due to autosaving being the preferred method for settings nowadays.
I see, I'm just bad at searching. I couldn't find any focus events for input elements, and at the same time was confused why I kept getting search results for "blur" :man_facepalming:
If you want to reliably set the value when it loses focus, then we can try using either the focusout
or blur
events, which don't seem to be used right now.
While messing around with manual location, I started seeing errors in the console.![image](https://github.com/animal-crossing-music-extension/ac-music-app/assets/6611767/3c0384b1-0cdf-4349-9bb4-0f0a386e266f)
This might be caused by sending a request every time the manual location input changes (i.e. every time a user presses a key). This error shouldn't happen during typical use, but would still be good to resolve that.
Maybe it could have an "Apply" button, and the new values are set only when the user clicks apply. (This would also be good for #26 - just let the user enter whatever they want, and only validate when they try to apply it)
Taking it even further, should there be a single apply/cancel button for the whole config page?