0

I am using jQuery UI 1.9.2. I am using jQueryUI.dialog to create a modal window.

I am getting a problem when the user tries to use the dialog in IE8. IE8 has a stupid issue where it cannot apply "focus" to an element if it is not visible on the page. My modal doesn't pop up immediately, so this error is causing the rest of the page to crash.

I have looked at this question: Prevent jQuery UI dialog from setting focus to first textbox

And while this and many other answers provide work-arounds (creating a hidden input field just before the button to feign that none of the buttons have focus) this will not work for me because it is still trying to add focus to a hidden element which will give that IE8 error.

Is there some kind of parameter or something in the modal dialog call that I can use to NOT add any focus at all?

If I had it my way, I would just like to tell the client to "suck it up and stop supporting 6-year old IE8" but I digress...

Community
  • 1
  • 1
AlbatrossCafe
  • 1,710
  • 6
  • 26
  • 49
  • Modals that don't pop up immediately are very common, I'm very surprised that jQuery would have a problem like this. Can you make a jsfiddle or stack snippet that demonstrates it? – Barmar Sep 03 '15 at 20:56
  • I am not sure how to do that - I don't think you can specify "browser type" in a fiddle. This is a problem that ONLY occurs in Internet Explorer 8 and is a fairly well-known IE8 issue. It works everywhere else. I wish I could just ignore it but my client insists on keeping their site compatible with IE8 – AlbatrossCafe Sep 03 '15 at 21:38
  • You can't specify browser type in the fiddle, but you can write the code that's not working, and then we can try it in IE8 to see what happens. – Barmar Sep 03 '15 at 22:46

0 Answers0