haukex / de-en-dict

German-English Dictionary
https://dict.zero-g.net/
GNU General Public License v2.0
12 stars 2 forks source link

URL search term only appears once the dictionary is loaded #36

Closed christophfriedrich closed 1 month ago

christophfriedrich commented 1 month ago

Describe the bug A tiny thing I noticed: When opening the app with a URL-supplied search term (e.g. https://dict.zero-g.net/#q=autumn), the search box remains empty until the dictionary is loaded, and only once that's completed, the search term is filled into the box (while the dictionary is being searched).

I.e. the order seems to be:

  1. load dict
  2. copy search term to box
  3. search dict
  4. show results

To Reproduce Visit https://dict.zero-g.net/#q=autumn while capturing your monitor (with a screen recorder or simply your phone) and then view the video slowly/frame by frame.

Expected behavior The search term is copied to the box immediately, i.e. steps 1 and 2 in the order above are swapped.

Screenshots I can supply such a video if necessary.

Desktop (please complete the following information):

Additional context This is a nice-to-have thing in case loading the dict takes longer and one starts wondering "oh, did the app not receive my input?", but I would only try to fix it if it can be done by quite simply swapping the order of some lines of code or some hooks. If the fix would need bigger changes, the issue is negligible.

haukex commented 1 month ago

Thanks for the suggestion, this should now be implemented in the latest version!