Skip to content

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

Closed

Conversation

scottgonzalez
Copy link
Member

Apply the same logic to tooltips.

Fixes http://bugs.jqueryui.com/ticket/10739

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
@tjvantoll
Copy link
Member

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.

@scottgonzalez
Copy link
Member Author

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.

@scottgonzalez
Copy link
Member Author

As for documenting why we include dialog, I plan on updated http://api.jqueryui.com/theming/stacking-elements/ to have this information.

@@ -365,7 +365,7 @@ $.widget( "ui.autocomplete", {
}

if ( !element || !element[ 0 ] ) {
element = this.element.closest( ".ui-front" );
element = this.element.closest( ".ui-front,dialog" );
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member Author

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

scottgonzalez added a commit that referenced this pull request Mar 26, 2015
@scottgonzalez scottgonzalez deleted the appendto-native-dialog branch March 26, 2015 11:36
scottgonzalez added a commit to scottgonzalez/api.jqueryui.com that referenced this pull request Mar 27, 2015
scottgonzalez added a commit to scottgonzalez/api.jqueryui.com that referenced this pull request Mar 27, 2015
scottgonzalez added a commit to jquery/api.jqueryui.com that referenced this pull request Mar 27, 2015
scottgonzalez added a commit to jquery/api.jqueryui.com that referenced this pull request Apr 20, 2015
scottgonzalez added a commit to jquery/api.jqueryui.com that referenced this pull request Apr 22, 2015
scottgonzalez added a commit to jquery/api.jqueryui.com that referenced this pull request May 7, 2015
scottgonzalez added a commit to jquery/api.jqueryui.com that referenced this pull request Sep 30, 2015
scottgonzalez added a commit to jquery/api.jqueryui.com that referenced this pull request Oct 28, 2015
scottgonzalez added a commit to jquery/api.jqueryui.com that referenced this pull request Oct 29, 2015
scottgonzalez added a commit to jquery/api.jqueryui.com that referenced this pull request Dec 17, 2015
scottgonzalez added a commit that referenced this pull request Jun 9, 2016
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
Closes gh-1517

(cherry picked from commit 8cf9879)
scottgonzalez added a commit that referenced this pull request Jun 9, 2016
jzaefferer pushed a commit to jquery/api.jqueryui.com that referenced this pull request Jul 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants