fix(iframe): allowDefault for events within message iFrames, just not link clicks

This commit is contained in:
Ben Gotow 2015-08-04 13:37:05 -07:00
parent 3228b0df7e
commit b54bf9feaa

View file

@ -85,10 +85,11 @@ class EventedIFrame extends React.Component
# iFrame, the mouseup never fires in the parent window.
_onIFrameClick: (e) =>
e.preventDefault()
e.stopPropagation()
target = @_getContainingTarget(e, {with: 'href'})
atom.windowEventHandler.openLink(target: target) if target
if target
e.preventDefault()
atom.windowEventHandler.openLink(target: target)
_onIFrameMouseEvent: (event) =>
node = React.findDOMNode(@)