Support close on mouseleave for tether dialog #130
+107
−1
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.
Hello,
Thanks for putting together a super-useful addon that tackles a really hard problem.
I recently had a
tether-dialog
modal that I wanted to have close onmouseleave
events, so that it would behave as a hoverable “pop-out” modal — much like the one seen here in Google Keep.After implementing this successfully in a local fork, I figured I'd PR it back and propose a few additions to the
tether-dialog
component.modal-dialog
itself already hascloseOnClick
, and the implementation here follows a very similar pattern (though I localized the functionality totether-dialog
because that seems to be the only pattern where it would make sense).I also added a dummy app example for the behavior and some corresponding acceptance tests. (As a bit of an aside, I couldn’t help but notice that some of the patterns in the dummy app’s application controller were a bit WET, so I felt somewhat awkward about adding to them. That said, I didn’t want to change the overall architecture as part of this PR, but would definitely be interested in subsequent contributions to do so 😄).