** Edit ** Why was this changed to a discussion, when it's obviously a bug! IE freezes on any dialog modal if you press the Tab button until you lose focus! That's a serious issue for any large site.
Hey guys,
In any IE browser, when tabbing through the elements on the page with a modal dialog open, IE will lock up after tabbing through the address bar and menu as soon as it gets back to the html elements. I have fixed this in my code with this nifty enhancement.
$(document).ready(function() {
$(":tabbable:first").focus(function() {
$(".ui-dialog:visible:last :tabbable:first").focus();
}
}
How it works.
It adds a focus function to the very first tabbable element on the page, and looks for any open dialogs, grabs the last visible one (the one on top), and then focuses on it's first tabbable element. I haven't tested this enough to make sure it's 100% effective in all scenarios, but it fixes a VERY nasty IE issue with keyboard accessibility.
Thanks!