Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Commit

Permalink
Removed iOS hack related to input focus
Browse files Browse the repository at this point in the history
+ fixed typo from the previous commit
  • Loading branch information
fancyapps committed Apr 9, 2018
1 parent c33194d commit 75abe74
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 64 deletions.
7 changes: 0 additions & 7 deletions dist/jquery.fancybox.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ body.compensate-for-scrollbar {
.fancybox-active {
height: auto; }

.fancybox-iosfix {
height: 100%;
left: 0;
overflow: hidden;
position: fixed;
width: 100%; }

.fancybox-is-hidden {
left: -9999px;
margin: 0;
Expand Down
26 changes: 3 additions & 23 deletions dist/jquery.fancybox.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ==================================================
// fancyBox v3.3.3
// fancyBox v3.3.4
//
// Licensed GPLv3 for open source use
// or fancyBox Commercial License for commercial use
Expand Down Expand Up @@ -527,18 +527,6 @@
$container,
buttonStr;

// iOS hack; https://bugs.webkit.org/show_bug.cgi?id=176896
if (
firstItem.type !== "image" &&
/iPad|iPhone|iPod/.test(navigator.userAgent) &&
!window.MSStream &&
!$("body").hasClass("fancybox-iosfix")
) {
$("body")
.addClass("fancybox-iosfix")
.css("top", -$W.scrollTop());
}

// Hide scrollbars
// ===============

Expand Down Expand Up @@ -2638,14 +2626,6 @@
$body.removeClass("fancybox-active compensate-for-scrollbar");

$("#fancybox-style-noscroll").remove();

if ($body.hasClass("fancybox-iosfix")) {
scrollTop = parseInt($body[0].style.top, 10);

$body.css("top", "").removeClass("fancybox-iosfix");

$W.scrollTop(-scrollTop);
}
}
},

Expand Down Expand Up @@ -2765,7 +2745,7 @@
});

$.fancybox = {
version: "3.3.3",
version: "3.3.4",
defaults: defaults,

// Get current instance and execute a command.
Expand Down Expand Up @@ -3258,7 +3238,7 @@
return "&start=" + ((m ? parseInt(m, 10) * 60 : 0) + parseInt(s, 10));
});
} else if (providerName === "vimeo") {
c = url.replace("&%23", "#");
url = url.replace("&%23", "#");
}

return false;
Expand Down
2 changes: 1 addition & 1 deletion dist/jquery.fancybox.min.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/jquery.fancybox.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@fancyapps/fancybox",
"description": "Touch enabled, responsive and fully customizable jQuery lightbox script",
"version": "3.3.3",
"version": "3.3.4",
"homepage": "http://fancyapps.com/fancybox/",
"main": "./dist/jquery.fancybox.js",
"author": "fancyApps",
Expand Down
8 changes: 0 additions & 8 deletions src/css/core.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ body.compensate-for-scrollbar {
height: auto;
}

.fancybox-iosfix {
height: 100%;
left: 0;
overflow: hidden;
position: fixed;
width: 100%;
}

.fancybox-is-hidden {
left: -9999px;
margin: 0;
Expand Down
20 changes: 0 additions & 20 deletions src/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,18 +517,6 @@
$container,
buttonStr;

// iOS hack; https://bugs.webkit.org/show_bug.cgi?id=176896
if (
firstItem.type !== "image" &&
/iPad|iPhone|iPod/.test(navigator.userAgent) &&
!window.MSStream &&
!$("body").hasClass("fancybox-iosfix")
) {
$("body")
.addClass("fancybox-iosfix")
.css("top", -$W.scrollTop());
}

// Hide scrollbars
// ===============

Expand Down Expand Up @@ -2628,14 +2616,6 @@
$body.removeClass("fancybox-active compensate-for-scrollbar");

$("#fancybox-style-noscroll").remove();

if ($body.hasClass("fancybox-iosfix")) {
scrollTop = parseInt($body[0].style.top, 10);

$body.css("top", "").removeClass("fancybox-iosfix");

$W.scrollTop(-scrollTop);
}
}
},

Expand Down
2 changes: 1 addition & 1 deletion src/js/media.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
return "&start=" + ((m ? parseInt(m, 10) * 60 : 0) + parseInt(s, 10));
});
} else if (providerName === "vimeo") {
c = url.replace("&%23", "#");
url = url.replace("&%23", "#");
}

return false;
Expand Down

0 comments on commit 75abe74

Please sign in to comment.