Skip to content

Uncaught TypeError Due to Missing Original Event #63

@karthicks

Description

@karthicks

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions