Skip to content

relative vs. absolute mouse position for elementFromPoint for usemap #28

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

Closed
dcasey160 opened this issue Nov 13, 2016 · 1 comment
Closed

Comments

@dcasey160
Copy link

We love this plugin, and are using it in the middle of a page, after a banner, menu bar, etc.
We found that the image map was not getting clicks like we'd expect.
I changed the lines in this block:
"$container.click(function(e) {
// Trigger click on image below lens at current cursor position"
to use clientX and clientY vs. pageX and pageY, and that solved the problem.
I wasn't too familiar with this but this note was helpful: http://www.zehnet.de/2010/11/19/document-elementfrompoint-a-jquery-solution/ .
Thank you!

@thdoan
Copy link
Owner

thdoan commented Nov 14, 2016

Thank you for this. I will test and implement your change in the next minor release 👍

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

2 participants