Skip to content

Tooltip: Fix re-enabling of delegated tooltips #1699

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

Fixes #14950

@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @jzaefferer, @mwiencek and @arschmitz to be potential reviewers

.removeAttr( "title" );
}
} );
this.disabledTitles = this.disabledTitles.add(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the .add() call (which tends to be rather slow)?

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 wanted to cover .disable().disable() and makes sure the collection wasn't overwritten.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.disabledTitles = this.element.find( this.options.items ).addBack() [...] would be simpler/faster, could also skip allocating the empty object.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would result in this.disabledTitles being an empty set after .disable().disable() using default settings because this.options.items looks for elements with titles, but the titles are removed after the first call.

@scottgonzalez scottgonzalez deleted the tooltip-delegate-disable branch April 21, 2016 14:59
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.

4 participants