Created
June 5, 2013 22:36
-
-
Save glebm/5717882 to your computer and use it in GitHub Desktop.
opera fix photobox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/vendor/assets/javascripts/photobox.js b/vendor/assets/javascripts/photobox.js | |
index 8d4f9a9..b7ed7f5 100644 | |
--- a/vendor/assets/javascripts/photobox.js | |
+++ b/vendor/assets/javascripts/photobox.js | |
@@ -14,6 +14,7 @@ | |
transitionend = "transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", | |
isOldIE = !('placeholder' in doc.createElement('input')), | |
isIE = !!win.ActiveXObject, | |
+ isOpera = (win.navigator.appName == 'Opera'), | |
isMobile = 'ontouchend' in doc, | |
thumbsContainerWidth, thumbsTotalWidth, activeThumb = $(), | |
blankImg = "data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==", | |
@@ -68,7 +69,7 @@ | |
// if useragent is IE < 10 (user deserves a slap on the face, but I gotta support them still...) | |
isOldIE && overlay.addClass('msie'); | |
- isIE && overlay.hide(); | |
+ (isIE || isOpera) && overlay.hide(); | |
autoplayBtn.on('click', APControl.toggle); | |
// attach a delegated event on the thumbs container | |
@@ -634,7 +635,7 @@ | |
if( overlay[0].className == '' ) return; // if already hidden | |
overlay.removeClass('show hide error pbLoading'); | |
image.removeAttr('class').removeAttr('style').off().data('zoom',1); | |
- if(isIE) // pointer-events lack support in IE, so just hide the overlay | |
+ if(isIE || isOpera) // pointer-events lack support in IE, so just hide the overlay | |
setTimeout(function(){ overlay.hide(); }, 200); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment