Skip to content

Commit

Permalink
Merge pull request johnculviner#53 from RightCrowd/ios-focus-issue
Browse files Browse the repository at this point in the history
Fix for ios 7.0.4(safari) where downloadWindows.focus is undefined.
  • Loading branch information
johnculviner committed Feb 20, 2014
2 parents b4e82c1 + 492f11d commit f1228f6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Scripts/jquery.fileDownload.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,11 @@ $.extend({
}

if (isIos) {
downloadWindow.focus(); //ios safari bug doesn't allow a window to be closed unless it is focused
if (isFailure) {
downloadWindow.close();
if (downloadWindow.focus) {
downloadWindow.focus(); //ios safari bug doesn't allow a window to be closed unless it is focused
if (isFailure) {
downloadWindow.close();
}
}
}
}
Expand Down

0 comments on commit f1228f6

Please sign in to comment.