1

We're using the code from this answer to Safari 5.1 prompt() function and cancel as a replacement for prompt in Safari 5.1, to work around the bug in that browser where the "Cancel" button returns the empty string rather than null.

Now we're suddenly having trouble with showModalDialog often (but not always) returning undefined instead of the value assigned to the popup's returnValue property. Note this is not due to cross-domain issues and is not due to form submission or other page reloads in the popup. While this may be unrelated, the problem does not occur on a machine still running Snow Leopard rather than Lion. The problem also does not occur in Firefox, Chromium, or IE8. A test page is available at http://www.thesaabsite.com/js/safari-5.1-bugfix-test.html.

Is something wrong with what we're doing, or is it a bug in Safari?

Community
  • 1
  • 1
Anomie
  • 92,546
  • 13
  • 126
  • 145

1 Answers1

0

I had a similar problem with Chrome. Although the cause is probably not the same, the workaround given in this thread may help you, at least until you find the real solution.

Community
  • 1
  • 1
ConnorsFan
  • 70,558
  • 13
  • 122
  • 146