fix: warning tooltip no longer fixed | prop cleanup #2141
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2042
What changes did you make?
lockScroll
from<Popup>
because that prop only works with modals not tooltipsWhy did you make the changes (we will use this info to test)?
login
linkIssue-Specific User Account
If you registered a new, temporary TDM User Account for this issue, indicate the
username (i.e., email address) for the account.
Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)
Visuals before changes are applied
before.mov
Visuals after changes are applied
after.mov
For Devs
This tooltip is using the library reactjs-popup, according to this issue with the latest major release this became an internal bug in the library.
What I did to remedy this was add an event listener to the body element and used an effect to move the tooltip on scroll. This is kind of a hacky way to fix this, which is why it's a tiny bit floaty, but it fixes the bug. We can revisit this once it has been fixed in the library. I made sure to remove the listener when the effect is cleaned up.