Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

enableElement empties the html of the element if it is called twice #278

Open
fatshotty opened this Issue · 0 comments

1 participant

@fatshotty

hello there,

around this line
https://github.com/rails/jquery-ujs/blob/master/src/rails.js#L315
you set the ujs:enable-with to false

but here:
https://github.com/rails/jquery-ujs/blob/master/src/rails.js#L311

you test the same property with !== undefined.
This condition returns true also the second time the method is invoked.

Is it a known issue or simply is the correct way to do that and I'm doing something wrong?

thanks in advance

PS: the method will be called twice because there is an error after ajax.
So, my action returns a 401 (error but correct).
Code performs a enableElement on error and enableElement again on complete.
Hope can help

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.