Bug Tracker

Opened 7 years ago

Closed 7 years ago

#12951 closed bug (duplicate)

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

Reported by: nospamallowed@… 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).

Change History (1)

comment:1 Changed 7 years ago by timmywil

Resolution: duplicate
Status: newclosed

Duplicate of #12846.

Note: See TracTickets for help on using tickets.