# Bug OP-20110 - Tooltip for "My spent time" entries that are only partially visible is shown in wrong place

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-20110

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Modules and project features / Time tracking, Frontend components and Primer design system |
| Target versions | 17.9.0 |
| Observed in versions | 17.8.0 |
| Sprint |  |
| Backlog bucket |  |
| Bug found in version (deprecated) | 17.8.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Alexander Coles |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

1.  Open "My page" with the "My spent time" widget placed in a column narrow enough that its calendar scrolls horizontally (the calendar has a minimum width of 800px, so this is the default two-column layout on a laptop screen).
    
2.  Log a time entry on a day whose column is partly scrolled out of view at the widget's right edge.
    
3.  Hover the visible part of that entry.
    

### What is the buggy behavior?

*   The popover opens to the right of the entry's full box, including the part hidden by the widget's scroll container. It floats outside the widget over the neighbouring widget, and its caret points into the clipped area.
    
*   Scrolling the calendar horizontally while the popover is open leaves the popover where it was.

### What is the expected behavior?

*   The popover opens right next to the part of the entry you can see, and its small pointer (the caret) points at that visible part. It does not float away over the neighbouring widget.
    
*   When you scroll the calendar sideways while the popover is open, the popover moves along with the entry.
    
*   When you reach a partly hidden entry with the keyboard (Tab), the calendar scrolls it into view and the popover opens next to it and stays open.
    
*   Unchanged on purpose: for an entry in the last visible column the popover may still stick out beyond the widget's right edge, as it always has for fully visible entries in that column.
    

### Hints for QA

1.  Make the "My spent time" widget narrower than its calendar: on "My page", use a window of about 1300 px or less with the default two-column layout, or drag the widget into a narrower column. The calendar then shows a horizontal scrollbar.
    
2.  Log a time entry (or use an existing one) on the day whose column is cut off at the widget's right edge.
    
3.  Hover the visible part of that entry. The popover should sit directly beside the visible part, pointer on it, not beside the hidden part.
    
4.  With the popover open, scroll the calendar sideways (shift + mouse wheel, or a trackpad swipe). The popover should follow the entry. Note for Chrome: when the entry slides out from under the mouse pointer, the popover closes as usual; hover it again and it opens in the right place.
    
5.  Keyboard: click somewhere neutral on the page, then press Tab until the partly hidden entry is focused. The calendar scrolls it into view and the popover opens beside it and stays open. Press Tab again to close it.
    
6.  Scroll the whole page with a popover open (hover an entry, then use the mouse wheel over the widget's header). The popover should follow and its pointer should keep pointing at the entry.
    
7.  Repeat 3 to 5 in Chrome, Firefox and Safari. Firefox and Safari scroll a focused entry into view at slightly different moments, so step 5 matters most there.
    
8.  Also fixed in the same pull request: the tooltip of the "Project timeline" widget. Drag the timeline so that a milestone or phase is half hidden at the left or right edge of the timeline, then hover its visible part. The tooltip should sit right above the visible part, pointer on it. Not affected: the tooltips of the budget charts.
    

### Technical details

The widget calendar is a horizontal scroller (`full-calendar { overflow-x: auto }` with `.fc-view { min-width: 800px }`). The popover is a top-layer `anchored-position` element, which Primer positions against the anchor's full bounding rect; nothing clips the top layer, and Primer listens to window scroll only, not to the container's.

Fix (https://github.com/opf/openproject/pull/25124): `visibleRect(element)` in `frontend/src/app/shared/components/anchored-popover/` intersects the entry's rect with the padding boxes of its overflow ancestors; `liveRect()` hands Primer a `DOMRect` proxy that re-reads that rect on every access, so Primer's own updates never work from a stale box; the calendar re-places the open popover on any scroll (capture-phase listener) instead of closing it, because focusing a partly hidden entry scrolls it into view and would otherwise close the popover it just opened. Flipping the popover into the widget (previously listed as option 2) and suppressing it under a minimum visible width (option 3) were deliberately left out.

The project timeline tooltip (`project-timeline-tooltip.popover.ts`) had the same exposure for items half hidden by vis-timeline's centre panel and now anchors on the same live visible rect (second commit of the pull request). It keeps closing on scroll since it is hover-only.

Related: https://github.com/opf/openproject/pull/25112 (DREAM-813) moves the calendar popover onto the shared placement helper; this bug exists before and after that change.

### **Logs**

No console errors.

### Screenshots and other files

<img class="image_resized op-uc-image op-uc-image_inline" style="width:386px;" src="/api/v3/attachments/924315/content"><img class="image_resized op-uc-image op-uc-image_inline" style="width:290px;" src="/api/v3/attachments/924316/content">

### Environment information

**OpenProject installation type**

*   Hosted cloud edition (production) and local development setup
    

**OpenProject version**

Reproduced on the current `dev` branch (2026-09-03) and on the production instance.

**Browser**

*   [x] Chrome
*   [ ] Firefox
*   [ ] Safari
*   [ ] Mobile Safari
*   [ ] Other (please specify)

**Operating System**

*   [ ] Windows
*   [x] Mac OS X
*   [ ] Mobile iOS
*   [ ] Mobile Android
*   [ ] Linux (please specify distro)
*   [ ] Chrome OS
*   [ ] Other (please specify)

**Language**

Browser and user language: English.
