Skip to content

"x" remove button on tags attempts to remove the tag from the incorrect field. #15

Merged
merged 1 commit into from Aug 9, 2011

2 participants

@GUI
GUI commented Aug 4, 2011

Fix variable scope. This caused a bug when multiple fields were present, and the first time the "x" was clicked to remove a tag.

As noted in issue #11, the first time you press the remove button for a tag, it doesn't work (if the field isn't focused). This is because the "that" variable in the callback erroneously refers to the last field on the page that was setup, and not the correct instance that the tag actually belongs to. So it ends up trying to remove the tag from the last input setup, where the tag may or may not exist. This is being caused by a global "that" variable being created inside createTag. Switching it to a local variable seems to fix the problem.

@GUI GUI Fix variable scope. This caused a bug when multiple fields were prese…
…nt, and the first time the "x" was clicked to remove a tag.
f816b26
@aehlke
Owner
aehlke commented Aug 5, 2011
@aehlke
Owner
aehlke commented Aug 9, 2011

never mind, just reviewed the code and it's great

@aehlke aehlke merged commit f868ea9 into aehlke:master Aug 9, 2011
@aehlke
Owner
aehlke commented on f816b26 Nov 23, 2012

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.