Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Fixes https://github.com/Baremetrics/calendar/issues/92 (close calendar on click outside) #93

Merged

Conversation

shai126
Copy link
Contributor

@shai126 shai126 commented Jan 2, 2019

Fixes #92

Swaps out .parents(), which only takes a string selector (not a DOM/jQuery element as is being used in the existing code) for .closest(), which can take an element too.

Since .closest() includes own element instead of just ancestors, we require a .parent() call first to "step up" 1 level in the tree before traversing.

@kalepail kalepail merged commit 3bf0c6e into Baremetrics:master Jan 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calendar not closing on click outside
2 participants