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

Uncaught TypeError Due to Missing Original Event #63

Open
karthicks opened this issue Aug 18, 2019 · 1 comment
Open

Uncaught TypeError Due to Missing Original Event #63

karthicks opened this issue Aug 18, 2019 · 1 comment

Comments

@karthicks
Copy link

Every once in a while, when the mouse moves out of the image, the following error is seen:

jquery.magnify.js:87 Uncaught TypeError: Cannot read property '0' of undefined
    at HTMLUnknownElement.moveLens (jquery.magnify.js:87)
    at HTMLUnknownElement.dispatch (jquery.js:5237)
    at HTMLUnknownElement.elemData.handle (jquery.js:5044)

If we can maybe return from the moveLens method if the event doesn't have a originalEvent, then perhaps that might be a good enough workaround?

              // Save last coordinates in case we need to call this function directly (required when
              // updating magnifiedWidth/magnifiedHeight while the lens is visible).
              nPosX = e.pageX || e.originalEvent.touches[0].pageX;
              nPosY = e.pageY || e.originalEvent.touches[0].pageY;
@sanjay-makwana-avidbrio
Copy link

@karthicks I think you did not add the magnify.css add and check it

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