react-component / react-component/tooltip

Tooltip jumping on sticky component

Open
#214 2 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
944
Forks
199
Avg merge
19h 1m
Merged PRs (30d)
3

Description

We render many tooltips on a date picker, the date picker is on a sticky component. As some points on the page, the tooltip jumps around. Any idea what is happening and how we can fix it? We've tried adding relative wrappers but no luck. I know it is from the sticky component but I am not sure how to get it resolved.

Here is a screencast of the issue: https://share.vidyard.com/watch/1iyQFAAjHbfL7E4AL1aPKM?

Version:

"rc-tooltip": "^4.0.3",

Code (looping over this for each day which j is the week and i is the day):

<Tooltip
  placement="top"
  id={`tooltip-${j}-${i}`}
  mouseLeaveDelay={0}
  overlay={ day.disabled }
>
	<div {...}>
    	<span>{ day.date ? format(day.date, 'd') : '' }</span>
	</div>
</Tooltip>

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the jumping behavior from the provided Tooltip usage with multiple tooltips inside a sticky date picker, using the linked screencast as the expected symptom. Trace how placement and positioning behave during sticky scrolling; done means the tooltip remains correctly positioned without relying on relative wrappers.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.