Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race condition bug when clicking submit button before hotkey or leaving field #12

Open
XGhozt opened this issue Oct 28, 2020 · 1 comment

Comments

@XGhozt
Copy link

XGhozt commented Oct 28, 2020

I think I'm running into a race condition problem. If the user opts to click "Update" or "Create" before actually pressing one of the hotkeys to add the tag then the typed text (which one would expect to be a tag) is just lost. It does look like the javascript fires to render the tag when the button is clicked, but by that time it's too late.

Steps to recreate:

  1. Type in a tag and do not press any hotkeys
  2. Click update button
  3. Tag is not saved
@superlatif-io
Copy link
Owner

Hi,

I was able to recreate your issue, but this present itself only when using the "update and continue" button, the regular button does trigger the "add on blur" event, I assume that you kept this event active in the field options.

I don't think the tag should be considered saved until it has the same aspect as the other tags in your input field, but the blur event should be triggered in the same way on both buttons, we'll see if there is something we can do about this, thank you for pointing that out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants