Skip to main content

Bug Tracker

Side navigation

#12951 closed bug (duplicate)

Opened November 23, 2012 06:30PM UTC

Closed November 26, 2012 08:34PM UTC

Using overflow-y:scroll, overflow-y:hidden and .toggle()

Reported by: nospamallowed@live.com Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.3
Keywords: Cc:
Blocked by: Blocking:
Description

This problem appears with FF 17, and is a bug in that software, however, a very, very simple jQuery workaround is possible that will save a lot of frustration for users.

When overflow-y:scroll (and probably overflow-x:scroll as well) is applied to an iframe, and then the .toggle('slow') method is used to hide it and then reshow it, the scrollbars will be gone. I assume the same thing happens with fadeIn and fadeOut, though I haven't tested these.

What happens is that jQuery applies overflow:hidden first, followed by display:none. Then when the animation shows the iframe again, display is changed to inline-block and overflow:hidden is removed afterward. For some reason FF 17 does not restore the scrollbar and I have submitted a bug at bugzilla.

Where jQuery can help here is if overflow:hidden is removed and THEN display is set to inline-block (or block or removed entirely) IN THAT ORDER, the scrollbar is then restored properly. It's simply a matter of the order the css is applied. Since I doubt FF will fix this until FF 18, it would be good if jQuery could implement this workaround ASAP so existing websites are not all broken for the next two months (and new developers aren't confused).

Attachments (0)
Change History (1)

Changed November 26, 2012 08:34PM UTC by timmywil comment:1

resolution: → duplicate
status: newclosed

Duplicate of #12846.