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

Conversation

oliversalzburg
Copy link
Contributor

Providing the initial origin through the panelClass of the panel is not the right approach. mdPanel remembers the original panel configuration and the provided panelClass and will restore it when the element is reused. This results in the new origin and the default (bottom) origin style to be placed on the element at the same time.

Fixes #10405

PR Checklist

Please check that your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[X] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

When the direction of a tooltip is changed, the resulting position will not be correctly applied, resulting in off-center placement of tooltips.

Issue Number: #10405

What is the new behavior?

The tooltip is correctly positioned after the direction was adjusted.

Does this PR introduce a breaking change?

[ ] Yes
[X] No

Providing the initial origin through the `panelClass` of the panel is not the right approach. `mdPanel` remembers the original panel configuration and the provided `panelClass` and will restore it when the element is reused. This results in the new origin and the default (bottom) origin style to be placed on the element.

Fixes #10405
@googlebot googlebot added the cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ label Jan 22, 2018
@Splaktar Splaktar added this to the 1.1.7 milestone Jan 23, 2018
@Splaktar Splaktar self-assigned this Jan 23, 2018
@Splaktar Splaktar added P2: required Issues that must be fixed. needs: review This PR is waiting on review from the team needs: manual testing This issue or PR needs to have some manual testing and verification done labels Jan 23, 2018
@Splaktar Splaktar self-requested a review January 23, 2018 07:26
Copy link
Contributor

@Splaktar Splaktar left a comment

Choose a reason for hiding this comment

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

LGTM. Manual tests successful.

@Splaktar Splaktar added type: bug pr: merge ready This PR is ready for a caretaker to review severity: regression This issue is related to a regression and removed needs: manual testing This issue or PR needs to have some manual testing and verification done needs: review This PR is waiting on review from the team labels Jan 27, 2018
@Splaktar
Copy link
Contributor

Splaktar commented Feb 5, 2018

This is failing the Google presubmit tests. So far any information that I have been given seems to indicate that the failure is a "flake", i.e. completely unrelated to this change.

I am continuing to work with and push for this fix to get in as I don't want to release 1.1.7 without it.

@mmalerba mmalerba merged commit 89bd69b into angular:master Feb 6, 2018
@oliversalzburg oliversalzburg deleted the fix/persistent-tooltip-origin branch February 6, 2018 19:06
@oliversalzburg
Copy link
Contributor Author

Awesome. Happy to see this merged :) Well done

chmelevskij pushed a commit to chmelevskij/material that referenced this pull request Jun 19, 2018
Providing the initial origin through the `panelClass` of the panel is not the right approach. `mdPanel` remembers the original panel configuration and the provided `panelClass` and will restore it when the element is reused. This results in the new origin and the default (bottom) origin style to be placed on the element.

Fixes angular#10405
@oliversalzburg oliversalzburg restored the fix/persistent-tooltip-origin branch January 21, 2020 17:14
@oliversalzburg oliversalzburg deleted the fix/persistent-tooltip-origin branch July 13, 2020 09:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ P2: required Issues that must be fixed. pr: merge ready This PR is ready for a caretaker to review severity: regression This issue is related to a regression type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

md-tooltip positioning incorrectly when direction is changed
4 participants