freqdec / datePicker

An attempt at writing a flexible, framework free, feature-rich and accessible datepicker
http://freqdec.github.io/datePicker/
MIT License
171 stars 56 forks source link

IE7/8 Focus issue when input is hidden #12

Closed bmsterling closed 11 years ago

bmsterling commented 12 years ago

If an input is hidden via display:none in IE7/8 and you try to give it focus, IE will through a "Can't move focus to the control..." error. So, I've changed the fd-hidden-input class to fd-screen-reader and all is fine.

That said, any recommendations on the best way to handle a user tabbing into that hidden input and forcing them to use the datepicker?

freqdec commented 11 years ago

Hi,

Apologies for taking so long to get back to you. Life etc.

I've actually just added code to try/caught the :focus on the associated input - which isn't the most graceful solution in the world but one that theoretically means that the display:none can be kept in the stylesheet (which would stop any unwarrented tabbing to the control).