Skip to content
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

created elements position erroneously gets set to fixed #95

Open
willherzog opened this issue Jul 14, 2018 · 0 comments
Open

created elements position erroneously gets set to fixed #95

willherzog opened this issue Jul 14, 2018 · 0 comments

Comments

@willherzog
Copy link

I discovered upon first attempting to use this plugin that, since one of the target image's parent elements was using fixed positioning (it was a modal window), the new elements created by the plugin were also using fixed positioning and were therefore wildly out of position from where they were supposed to be. Clearly in my case they should have been using the default absolute positioning.

I managed to find the culprit code on lines 1123-1125 (of version 0.9.10) where it starts with this comment: "Also check if any of the ancestor elements has fixed position" - removing these lines fixed the problem for me.

I'm not sure why it was using fixed positioning if any parent element used fixed positioning, but clearly this part of the code needs to be made more sophisticated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant