-
-
Notifications
You must be signed in to change notification settings - Fork 333
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
Dialog API buff-up. #325
Dialog API buff-up. #325
Conversation
…l and all take a jQuery selector or jQuery object.
… already been closed.
Test failure seems to be a travis error. It can't install phantomjs for ember-release, but default, beta, and canary all pass fine. |
|
||
constants: service(), | ||
|
||
didInsertElement() { | ||
if (this.get('escapeToClose')) { | ||
let parent = this.get('parentElementSelector'); | ||
$(parent).on(`keydown.${this.elementId}`, (e) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
+this.get('defaultedParent')
-this.get('parentElementSelector')
defaultedParent
is the new parentElementSelector
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, parentElement
|| parentElementSelector
is a very clear descriptor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not complaining about the names. Just trying to understand.
parent
,origin
,openFrom
,closeTo
are all optional and all take a jQuery selector or jQuery object.I found the original API inconsistent and inconvenient in actual use. This PR normalized the API and cleans up some old code remnants.
Note that
parent
is not an id, but a jQuery selector or object. An id is created, if needed, for{{ember-wormhole}}
.