Skip to content

Conversation

@robbie-cahill
Copy link

No description provided.

@kchrismc
Copy link

kchrismc commented Aug 28, 2018

This fix leads to an error when trying to swipe between images in a gallery with touch.

Error: Cannot read property 'href' of undefined

e.srcElement is undefined in this case.
Is it possible to just check on
e.srcElement === undefined?

EDIT:
Just found out that there is no attribute srcElement in this specific event (PointerEvent).
With e.originalEvent.srcElement I get my image. But then there will be a src attribute instead of a href attribute - depending on what type the srcElement is.
So your solutions seems to be specific but does not fit in other cases.

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

Successfully merging this pull request may close these issues.

2 participants