Hooked74
Hooked74
### Link to the code that reproduces this issue https://codesandbox.io/p/devbox/stupefied-paper-s2v3s3 ### To Reproduce 1. Start the application in development (next dev) 2. Click on the link "Test Page" 3. Content...
After migrating to the new @rc-component/trigger, there were problems with the calculation of nextOffsetX, which causes an incorrect popup offset. https://github.com/react-component/trigger/issues/333#issue-1606140740
When recalculating nextOffsetY when popup goes beyond the viewport boundaries incorrect calculations occur. I see problems in these lines: https://github.com/react-component/trigger/blob/a73beef20376e3e32ecb918a0c1fbb0cdabb42f3/src/hooks/useAlign.ts#L313 https://github.com/react-component/trigger/blob/a73beef20376e3e32ecb918a0c1fbb0cdabb42f3/src/hooks/useAlign.ts#L327 Let's analyze each line separately. -------------------------------------------------------------------------------------- ```js nextOffsetX =...