-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Include native dialog in appendTo/ui-front logic #1517
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
Conversation
Even though there's no reason to ever configure the parent element via an `appendTo` option, following the standard logic is useful for scrollable elements and native dialogs. Fixes #10739
There should probably be tests for this, or at least a reference to the tickets in the source so we remember why we're treating native dialog elements differently. The code itself looks good to me. |
Well, the thing is those comments would be in multiple places and would end up living on for years. Once dialogs become a more common thing, it will just be known that dialogs have crazy stacking logic. |
As for documenting why we include |
@@ -365,7 +365,7 @@ $.widget( "ui.autocomplete", { | |||
} | |||
|
|||
if ( !element || !element[ 0 ] ) { | |||
element = this.element.closest( ".ui-front" ); | |||
element = this.element.closest( ".ui-front,dialog" ); |
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 is there no space after the comma?
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.
It's a habit that creeps in every once in a while. I blame John for always using no spaces in selectors since they can't be munged by minification tools. Off the top of my head, I was able to think of two places we have selectors with commas and one has spaces and one doesn't :-P
I can add the spaces in; I actually prefer it that way.
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 prefer the space, too.
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 did a search and found all the selectors that weren't using spaces. Here's a PR: #1521
Apply the same logic to tooltips.
Fixes http://bugs.jqueryui.com/ticket/10739