Calling qtip("disable") toggles status rather than disabling due to no state variable #597
Comments
I decided to get a bit more clever and just do this in the qtip js file, seems to be working:
|
|
For the purposes of transparency (woo open-source) here's a conversation about this bug we had, where I'll play the part of both Rob and Myself ;) This isn't strictly true (from my perspective, it's your code but hear me out!). Toggle certainly does take a state, but the name 'toggle' implies that. You are toggling on and off. You then use 'hide' and 'show', which call toggle with the state. Disable does not mean toggle, in the same way 'hide' does not mean toggle. That would be like having hide expect a state and having no show method. That's why locally in your code I made:
To me that is more intuitive. |
You make a valid point actually Rob, I was a bit quick to brush you off so apologies for that! What are your thoughts on EDIT: I'm doing that, as it sounds reasonable and keeps within the jQuery signatures :) |
I'm using qTip2 for validation error messages. Because I have dynamic validation, I end up calling disable multiple times on my qtips. I was at first mystified why this was actually toggling them between enabled and disabled.
A little digging revealed that if you call qtip("disable"), it calls the disable function with no 'state' argument. 'state' comes back undefined, so the status gets toggled.
I was able to get around it with $("something").qtip("api").disable(true), rather than simply calling qtip("disable"), but I believe this should be fixed.
The text was updated successfully, but these errors were encountered: