-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#cboxOverlay is displayed over #colorbox when page is scrolled down in UIWebView on iOS9 #753
Comments
I tried to change css https://github.com/jackmoore/colorbox/blob/master/example1/colorbox.css#L7 into
then overlay is displayed beneath the content. (But, of course, if the height of page exceeded 10,000px, overlay is not shown below the border. |
I haven't tried to recreate your situation, but instead of doing this:
Maybe try this:
This moves the z-index one unit lower than the content window. This shouldn't be necessary since the content window should be inserted into the DOM after the overlay, meaning that it should be on top if their z-index is equivalent. I expect setting the z-index lower for the overlay will resolve it, rather than relying on DOM order. |
I tried z-index but it doesn't work. Overlay is still placed over the content. Fixed position DOM may be placed over absolute position despite z-index or DOM order in this condition. I think this must be bug of UIWebView of iOS9. To avoid this problem, some hack may be needed. |
According to https://medium.com/@designblooz/ios-9-css-bugs-on-uiwebview-73b19bf9bae7 , I added -webkit-transform and tried this, then problem is fixed.
I think this css has no side effect. |
Fix the broblem that #cboxOverlay is displayed over #colorbox when page is scrolled down in UIWebView on iOS9. To avoid UIWebView's probrem, add translate3d(0,0,0) to related element.
Fix issue #753, iOS9 UIWebView probrem
Environment:
cboxOverlay is displayed over #colorbox in above condition (The overlay is displayed over the content of colorbox).
Please see the screenshot.
I tried to create new XCode iOS project and placed only UIWebView.
I load html bellow. (and I placed colorbox-master directory on the same directory.)
After the app launched, I scrolled down about 1 screen height, then tapped 'Tap Here!!!'. Then the problem was reproduced.
This may be a bug of WebView of iOS9.
The text was updated successfully, but these errors were encountered: