Side navigation
#14848 closed bug (fixed)
Opened March 05, 2014 12:32AM UTC
Closed March 21, 2014 02:57AM UTC
on at least some form elements .hide(0) acts as a toggle instead of simply hiding
Reported by: | randy@e-junkie.com | Owned by: | gibson042 |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.11.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
If .hide() is applied with duration 0 (I haven't actually tried other values yet), either as a single argument or an object {duration: 0}, to some elements within a form (at least the label & radio buttons will work this way), it acts as a toggle instead of just hiding the element regardless of its former state.
Without arguments, it behaves correctly.
If you switch to jQuery-1.10.2, it behaves as expected.
It seems to (mis)behave the same in Firefox & Chrome. I don't know about IE yet.
http://jsfiddle.net/KarMannJRO/YTGvH/
Click the "hide it" button repeatedly. The <p> element disappears, and stays hidden; the label & associated input toggle between hidden & shown.
Attachments (0)
Change History (5)
Changed March 05, 2014 11:25PM UTC by comment:1
Changed March 06, 2014 12:15AM UTC by comment:2
Biggest, less reduced case shows that it affects all type of input elements (except hidden, I suppose) and textareas & labels alike.
Changed March 10, 2014 04:39PM UTC by comment:3
owner: | → gibson042 |
---|---|
status: | new → assigned |
Changed March 10, 2014 07:00PM UTC by comment:4
_comment0: | Also, I've tried it with other values for duration, and it looks like it doesn't matter what the value is, just that it's specified. Handy test cases here: http://jsfiddle.net/KarMannJRO/YTGvH/6/ → 1394486002610561 |
---|
Also, I've tried it with other values for duration, and it looks like it doesn't matter what the value is, just that it's specified. Also, the showing is always instant regardless of duration value. Handy test cases here: http://jsfiddle.net/KarMannJRO/YTGvH/6/
Also, for a slightly more reduced case, it works similarly if you remove the label element but leave the input, and update the JS .hide() line appropriately, except that then it's only the button itself that toggles, of course, and the text remains shown throughout.
http://jsfiddle.net/KarMannJRO/YTGvH/3/