Hidden panels should have display: none #5652

Closed
alebedev opened this Issue Feb 18, 2013 · 3 comments

Projects

None yet

2 participants

@alebedev

Right now, panel that isn't visible still appears as block-display element in DOM. This results in several problems:

  1. Desktop Chrome. It's possible to switch to a link/input on hidden panel with TAB. This results in panel section being shown but panel content hidden. Would be better if panel elements were not selectable with TAB when panel isn't open
  2. Mobile Safari (iOS 4.33, iOS 6) sometimes displays panel section without content when page is loaded in portrait orientation.

Both issues can be fixed by adding 'display: none' style to panel and showing it right before opening.

I'll try to provide test pages by tomorrow.

@jaspermdegroot
Member

@alebedev

Using display: none; for the panel has downsides. One of them is that we want to know the height of the panel contents before opening the panel, e.g. to check if we need to unfix fixed panels. With display: none; we can't do that. Anyway, I will look into the issues you reported.

@jaspermdegroot jaspermdegroot added a commit that closed this issue Mar 27, 2013
@jaspermdegroot jaspermdegroot Panel: Visibility hidden for closed panels. Fixes #5652.
This prevents focus on links in closed panels when using the tab key.
4ce2d28
@jaspermdegroot jaspermdegroot added a commit that referenced this issue Mar 27, 2013
@jaspermdegroot jaspermdegroot Panel: Visibility hidden for closed panels. Fixes #5652.
This prevents focus on links in closed panels when using the tab key.
17509b6
@jaspermdegroot
Member

@alebedev

I fixed the first issue by setting visibility: hidden; for the closed panel.

About the second issue, I haven't been able to reproduce this. Can you test again with latest code and provide a test page that illustrates the problem. Also, what iDevices did you test on and does "sometimes" mean random?
See the contributing guidelines for our JS Bin test page template. Thanks!

@alebedev

Weren't able to reproduce empty panel in Safari for last few weeks. I suspect it was side effect of some issue closed before 1.3 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment