adobe / adobe/react-spectrum

The useOverlayPosition hook accepts a placement prop bottom, but return the placement is top

Open
#7,058 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
15.9k
Forks
1.6k
Avg merge
3d 9m
Merged PRs (30d)
59

Description

### Provide a general summary of the issue here

The useOverlayPosition hook accepts a placement prop bottom, but return the placement is top
As in the Prpover Usage case on the website, the behaviour on the UI will be top, even though the placement is set to bottom.

### 🤔 Expected Behavior?

when i input the placement is bottom, it should return a bottom

### 😯 Current Behavior

when I input the placement bottom, the useOverlayPosition return top
![CleanShot 2024-09-20 at 14 24 45@2x](https://github.com/user-attachments/assets/ebadc97c-93c4-494a-b050-63098b5c2b87)
![CleanShot 2024-09-20 at 15 48 03@2x](https://github.com/user-attachments/assets/b19611c1-9f22-4163-9a67-1e92eb76c657)

### 💁 Possible Solution

_No response_

### 🔦 Context

_No response_

### 🖥️ Steps to Reproduce

https://react-spectrum.adobe.com/react-aria/usePopover.html

### Version

@react-aria/overlays-3.22.1

### What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge

### If other, please specify.

_No response_

### What operating system are you using?

mac

### 🧢 Your Company/Team

_No response_

### 🕷 Tracking Issue

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue through the usePopover usage case at https://react-spectrum.adobe.com/react-aria/usePopover.html, using @react-aria/overlays-3.22.1 and placement set to bottom. Trace the useOverlayPosition hook entry point and verify the reported placement across the listed browsers; done means bottom is returned and reflected in the UI when bottom is requested.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.