ReactEventListener.dispatchEvent should ignore non own documents. #3605
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We are writing firefox sidebar plugin with React and faced some issues with dead objects.
Due to overprivileged environment of plugin event can bubble/capture out of iframe. And if surrounded application has React instance it captures
event.target
of element of non own document. After reloading the iframe and trying to interact with iframe content it throws an exception about Firefox dead object(garbage collected DOM element).Also it could lead to an issue with the same
reactId
:Error: Invariant Violation: ReactMount: Two valid but unequal nodes with the same data-reactid: .0
.Please find the example Firefox plugin along with the souce code: https://dl.dropboxusercontent.com/u/37680916/react-bug.zip