Modal dismiss issue when the link that opened the popup is invisible on IE8
Created by: flegall
When I close the modal dialog on IE8, I have to do it twice when the link that opened the modal is made invisible (visibility: hidden in CSS when not hover).
This is caused by the call to focus() on the link that opened the popup. This calls fails if the link is made invisible. The exact IE error is "Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus". The error is not caught by JQuery: http://bugs.jquery.com/ticket/11054.
The bug can be reproduced here : http://flegall.github.io/ie8-modal-bug/ (Couldn't make jsfiddle work on IE8 :) ...)