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

Avoid reveal modal closing upon click of an element not in the DOM #9146

Merged
merged 1 commit into from
Sep 26, 2016

Conversation

ardeshireshghi
Copy link
Contributor

Before submitting a pull request, make sure it's targeting the right branch:

  • For documentation fixes, use master.
  • For bug fixes, use develop.
  • For new features, use the branch for the next minor version, which will be formatted v6.x.

If you're fixing a JavaScript issue, it would help to create a new test case under the folder test/visual/ that recreates the issue and show's that it's been fixed. Run npm test to compile the testing folder.

Happy coding! :)

Added check to make sure e.target is still in the DOM. I came across a bug when I created a google map canvas inside reveal modal, whereby upon closing the info popup on a map marker, the entire reveal modal gets closed. This is because when the overlay click handler is invoked, Google code has already removed the e.target element and the overlay handler only gets a ghost element and can not find it in the modal element

Added check to make sure e.target is still in the DOM. I came across a bug when I created a google map canvas inside reveal modal, whereby upon closing the info popup on a map marker, the entire reveal modal gets closed. This is because when the overlay click handler is invoked, Google code has already removed the e.target  element and the overlay handler only gets a ghost element and can not find it in the modal element
@ardeshireshghi
Copy link
Contributor Author

@Owlbertz Could you please provide some feedback on this?

Owlbertz added a commit to Owlbertz/foundation that referenced this pull request Sep 21, 2016
Copy link
Contributor

@Owlbertz Owlbertz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from my point of view.

@Owlbertz Owlbertz merged commit 355063d into foundation:develop Sep 26, 2016
kball added a commit that referenced this pull request Sep 27, 2016
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