Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Conversation

crisbeto
Copy link
Member

Fixes the raw tooltip text text being added to the parent, if a tooltip contained a data binding, instead of the interpolated value.

Fixes #6855.

@crisbeto crisbeto added the needs: review This PR is waiting on review from the team label Apr 22, 2016
// doesn't need to be set up if the element doesn't have any data
// bindings.
if (element.text().indexOf($interpolate.startSymbol()) > -1) {
scope.$watch(function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Huge performance impact with large lists where each item as a tooltip.
This is why we did the mutation observer... this $watch( ) here my re-introduce perf issues.

Copy link
Member Author

Choose a reason for hiding this comment

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

Alright, I'll try to rework it and keep this one as a fallback for the case where a mutation observer isn't supported.

Copy link
Member Author

@crisbeto crisbeto Apr 22, 2016

Choose a reason for hiding this comment

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

A question about the mutation observer: In order to get it to fire for text changes, the characterData and subtree options need to be enabled. This fires the observer roughly twice as often as before. I think this might end up being slower than the watcher because we'll be calling the function that sets aria-label about 5 times on mouseover and about 5 times again on mouseleave.

@ThomasBurleson ThomasBurleson added needs: work and removed needs: review This PR is waiting on review from the team labels Apr 22, 2016
@crisbeto crisbeto added the needs: feedback The issue creator or community need to respond to questions in this issue label Apr 29, 2016
@crisbeto crisbeto added needs: review This PR is waiting on review from the team and removed needs: feedback The issue creator or community need to respond to questions in this issue needs: work labels May 17, 2016
@crisbeto
Copy link
Member Author

Relabelling as per our discussion.

…-label

Fixes the raw tooltip text text being added to the parent, if a tooltip contained a data binding, instead of the interpolated value.

Fixes angular#6855.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: review This PR is waiting on review from the team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants