Tested on Chrome, Firefox, Safari, and iOS: Y
(Remember to test all browser sizes)
Tested for race conditions (with delayed API calls if applicable): Y
Note: The change looks good, haven't found any bad behaviors yet. Just two minor things:
Add some delay, like 3 seconds.
Open up a RANGE or STRING widget, like the volume id widget (wait until everything is settled).
In volume id, type something like "C" and leave focus.
Before 1 second timer expires, quickly focus in the same input, remove "C" and focus out.
A search will be performed (both result & widget spinner will be running, but result will not change because search selections are the same). Result spinner will only run if we try 3-4 the first time when a widget is open. Do we want to prevent result spinner from running in this case because search selections are the same? -> this is the 1st one.
If we repeat 3-4 again, only the widget spinner will be running, but result spinner won't run (this is expected). Do we want to hide the widget spinner if no search is run? -> this is the 2nd one.
I fixed a few bugs I found in the existing code, include the two mentioned above:
Make string widgets spinner hidden by default since there are no hints to wait for
When turning on widget spinners after a search change, only turn on those for range and mult widgets
Fixed bug with validateinput return overwriting input field. This happened when an input field was changed, validateinput was called, and then the field was changed back to its original value, which did not trigger another called to validateinput. Then when the first call eventually returned, it overwrote the input value since there was no higher reqno telling it not to.
Don't turn on widget spinners if search didn't change unless we need to replace ? fields. Previously we always turned on the spinners and got new hinting data even if we didn't need to.
Description of changes:
Removed 1 second interval timer and replaced with a single-shot timer that is started every time the user changes something related to search.
Known problems:
None