I've been working on an one page app, and noticed that my dropdowns stays open sometimes when they suppose to be hidden. I investigated why that happens and find out that if parent element is hidden, hiding element with jQuery UI using extended hide
functions is worthless.
This fiddle example which shows what I mean, just try to click Hide
& Show
buttons, and then click Show parent1
and try to hide element there. You'll notice that status indicator gets updated instantly but once you back to parent2
you'll see the element is still visible.
I found that using jQuery hide
without arguments or only with miliseconds passed, it does work correctly and stops working once I update it with jQuery UI arguments, so I assume it is jQuery UI not jQuery itself problem.
So my question is why jQuery UI is working in this way, is that the way it suppose to work or it is a bug?