Closed Bug 2005451 Opened 1 month ago Closed 1 month ago

`position-try: normal [...]` fails to parse because we disabled `position-try-order`

Categories

(Core :: Layout: Positioned, defect)

Firefox 147
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: gundersen, Unassigned)

References

Details

Attachments

(1 file)

See https://codepen.io/mariusgundersen/pen/WbwPWVj

The popover is not positioned correctly near the edges:

  • At the top of the page the position-try: normal flip-block is not applied, so the popover is positioned outside the viewport
  • At the (bottom) left edge the popover is positioned all the way to the right, while at the right edge it's positioned all the way to the left
  • At the top of the page the position-try: normal flip-block is not applied, so the popover is positioned outside the viewport

We don't yet support position-try-order which is corresponding to normal part of the position-try shorthand, so parsing of it is disabled by Bug 2002813. Not specifying normal in the shorthand works around this issue.

:emilio, I wonder if it's worth just parsing normal for the shorthand, since well, that is the current behaviour anyway.

  • At the (bottom) left edge the popover is positioned all the way to the right, while at the right edge it's positioned all the way to the left

Should be fixed by Bug 2004040.

Changing title of the bug to focus on potentially letting us parse position-try-order: normal.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(emilio)
See Also: → 2004040, 2002813
Summary: Anchored popover is positioned incorrectly → `position-try: normal [...]` fails to parse because we disabled `position-try-order`
Whiteboard: [anchorpositioning:triage]

I think parsing position-try: normal flip-block or so seems fine. However even with that fixed, there seems to be an issue related to the margin.

If I make the popover use margin: 0 instead of margin: 1em then I get the expected behavior. I think bug 2004040 might need to nudge the margin rect rather than the border-box rect?

Flags: needinfo?(emilio) → needinfo?(dshin)

We do - In fact the alignment function should just be receiving the margin box.

... Ah, we're clearing margins when anchor-center here, Should only apply when auto.

Flags: needinfo?(dshin)
Depends on: 2005756

Bug 1989059 has implemented & enabled position-try-order, so I think there's no reason to special-case parsing normal in the shorthand at this point.

Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → WONTFIX
Whiteboard: [anchorpositioning:triage]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: