six-tag: empty tooltip opens and gets stuck when hovered right after render
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 50/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start in the six-tag component's updateTooltip() path, which disables the inner six-tooltip about 0.3 seconds after render, then read hide() in six-tooltip.js around line 132, where the early return on disabled blocks closing. Two fixes are proposed: create the inner tooltip disabled, or let hide() close a visible tooltip. Done means hovering during render no longer leaves an empty tooltip open, and the maintainers have chosen which fix to keep.
Written by the indexing model from the issue text.
Description
Six Webcomponents version
ui-library 5.5.0
Steps to reproduce
- Open a page that shows a list of six-tag elements after loading data.
- Keep the mouse over one of the tags while the page loads.
- An empty tooltip appears and does not go away.
What is expected?
Should not be any empty tooltip
What is actually happening?
If the user hovers a six-tag while the page is still rendering, an empty tooltip opens and stays open forever, even after moving the mouse away.
Cause:
- When a six-tag is created, its inner six-tooltip is enabled and has empty content.
- About 0.3 seconds later, six-tag runs updateTooltip(). This sets the tooltip to disabled, because the text is not cut off.
- If the user hovered during that 0.3 seconds, the tooltip is already open. Now it is open and disabled.
- six-tooltip.hide() does nothing when the tooltip is disabled (six-tooltip.js, line 132: if (!this.isVisible || this.disabled) return). So it can't close.
System Info
Any additional comments?
Suggested fixes (either helps):
Either of these would solve it:
- Create the inner tooltip in six-tag as disabled from the start. Enable it only when the text really is cut off.
- Let hide() close a visible tooltip even if it is disabled.
Workaround we tested
This listener makes the problem disappear:
document.addEventListener('six-tooltip-show', e => {
const tt = e.composedPath()[0];
if (!tt.content?.trim() && tt.getRootNode().host?.tagName === 'SIX-TAG') e.preventDefault();
}, true);
We would rather not keep this workaround in our code, so we are waiting for your fix.
Impact: it affects every six-tag. It is only cosmetic, so priority is minor.
Link to our test env page where you can reproduce it: ReXplorer TEST
- Dominant language
- TypeScript
- Stars
- 30
- Forks
- 14
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 5
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from six-group/six-webcomponents
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
six-group/six-webcomponents#600 ·
-
breaking change v6
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
six-group/six-webcomponents#573 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
six-group/six-webcomponents#601 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
six-group/six-webcomponents#597 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
six-group/six-webcomponents#553 ·
All issues in six-group/six-webcomponents
Similar issues
-
area: batch
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
inabagumi/shinju-date#7294 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
streaming-video-technology-alliance/common-media-library#700 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
vercel-labs/ui#809 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
KrisCris/village-in-the-shade-guide#75 ·
Maintainers usually reply within 1 day
-
bot:ai-assisted component:platform-js status:untriaged
Difficulty 1/5 Under an hour Newbie friendliness 74/100
midnightntwrk/platform-js#38 ·