mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 13:06:00 +03:00
[PR #413] [MERGED] fix: absolute positioned elements now position relative to parent #517
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#517
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/413
Author: @edlsh
Created: 12/13/2025
Status: ✅ Merged
Merged: 12/15/2025
Merged by: @kommander
Base:
main← Head:fix/absolute-positioning-406📝 Commits (3)
b0daf63fix: absolute positioned elements now position relative to parent90d3a1atest(core): add absolute positioning snapshot tests18b7ceeprettier📊 Changes
3 files changed (+1121 additions, -2 deletions)
View changed files
📝
packages/core/src/Renderable.ts(+2 -2)➕
packages/core/src/tests/__snapshots__/absolute-positioning.snapshot.test.ts.snap(+481 -0)➕
packages/core/src/tests/absolute-positioning.snapshot.test.ts(+638 -0)📄 Description
Fixes #406
Yoga's
getComputedLayout()returns positions relative to parent (ref), but the x/y getters only added parent offset forrelativeelements. Removed the position type check.Verification: Tested nested absolute child with
bottom: 0- now renders at bottom of parent container instead of global offset.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.