-
Notifications
You must be signed in to change notification settings - Fork 523
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
overlay not in visible area, not possible to close #161
Comments
I could not find a (good) solution to this. Right now you can only avoid this issue by setting the configuration variable fixed: false |
i am guessing but the effect code gets it target position before the animation starts then moves the object. The code needs changing so the target position is continuously updated during the animation. |
can I see your fix? thanks. |
my fix is not nice: var top = content.offset().top - $(window).scrollTop(); Also, becuase the popup is fixed i dont want it any larger than the users screen size since they will not be able to scroll over the hidden content. var maxHeight = $(window).height() - top; you could do the same with width. The issue is with position fixed content is the user can not scroll to it or around it. So i therefore have to check it is visible with both scroll position and with and height. The other issue is that you set isOpened() to true before the apple animation starts not after. So any calls to this function returns true even though it not actually open yet. A good example of this issue is:
the overlay starts opening before the browser scrolls down the page to #some_location_down_the_page. The result is the overlay when open is out of sight up the page somewhere. because it is position fixed you cant scroll back to it either. The user just sees the mask and no close button. Another example is as i mentioned before to open the overlay and use your mouse wheel to scroll during the animation. I think you could fix this quite easily. The issue is the animated content is positioned relative to the document. The document can move if the scrolled. The solution is to put the animated content inside a static container. |
Further to my response here, i tried my solution as a test. it works. <div class="overlayContainer"> CSS $("#overlay").overlay({ To implement this nicely when the user selects fixed:true the code should wrap the overlay with this wrapper with position fixed, rather than apply position fixed to the overlay. when it creates the IMG layer with the background that too needs to be inside this container. I hope this help |
this is now fixed. thanks to your latest comment. here is the commit: http://github.com/jquerytools/jquerytools/commit/12f70d55b37ea91a19e61929e9fa47a9cd97c663 and here is the updated apple effect: tested it with fixed and absolute positioning and everything works fine. THANKS! |
no worries. your solution is different to mine, I dont see any container being added but I can see you have changed how you position the IMG, does this solve the issue? ta |
right now there is no nightly build. I suggest you include follwing files: http://cdn.jquerytools.org/1.2.4/jquery.tools.min.js and try. |
hi,
|
my fix for this is onLoad to check the position with this: var top = content.offset().top - $(window).scrollTop(); If you are unable to find the cause then maybe you shoudl put this final check in your code |
forget what i have said here, i found the root cause: var itop = conf.start.top || Math.round(w.height() / 2), if (trigger) { // I HAVE ADDED THE FOLLOWING CHECK HERE 1 OF 2 CHANGES // I HAVE ADDED THE FOLLOWING CHECK HERE 2 OF 2 CHANGES This might need some more testing As you no doubt already know with fixed positioning the co-ordinates are relative to the browser and not the document. so you need to use scrollTop to calculate the start position relative to the browser, but you dont want it for the end position. hope this helps. |
ok. did this: http://github.com/jquerytools/jquerytools/commit/66b187a7b344c3777a449908098277df28e86dd4 here is the latest version: how does that work for you? |
it works very nicely thank you. tested in chrome and IE 7. cheers |
this/next week |
The only other improvement i might suggest; is to not allow the overlay width and height to be any larger than the screen visible area will permit when position is fixed? my onLoad function does this in a crude way with: var top = content.offset().top - $(window).scrollTop(); I guess you could provide a configuration parameter to allow this restriction to be switchable. |
the maximum width is set with CSS |
yes, i would normally agree except the max width or hight needs to be equal to the visible screen size. cant do this with css alone ? |
whenthe overlay (with apple effect) is being shown, before onLoad has completed and during the animation, scroll down the screen with your mouse scroll wheel.
The result is that the overlay appears above your display area and consequently the user is not able to see the overlay, and close the overlay. so the user just sees the mask. the user is unable to do anything and has to click refresh.
The text was updated successfully, but these errors were encountered: