Skip to content

Negative absolute top value on ChangeList DropDown #1620

@pnost

Description

@pnost

What version of Unfold are you using?

0.67
What version of Django are you using?

For example: 5.2

What browser are you using?

Safari 18.5

Did you checked changelog/commit history, if the bug is not already fixed?

No

Did you searched other issues, if the bug is not already fixed?

No
Did you checked documentation?

Yes

Are you able to replicate the bug in the demo site?

No

Describe your issue

On my changelist view I use a @display dropdown=true with custom content.

My problem is that If i have rather large content or set "height": 1024 to a large number, the <div> will be positioned either above or below the dropdown title. This is fine if there are lots of entries in the changelist.
However if there are only 1-3 lines, the div is positioned above the dropdown title. The absolute position is somewhere in a negative area.

eg. top: -522px; so half of my div is hidden and because of the few changelist entries the page is not large enough to scroll?

Where is top being calculated?

In helpers/display_dropdown.html I could only find:
<div class="bg-white border border-base-200 overflow-y-auto overflow-x-hidden p-3 rounded-default shadow-lg text-sm top-7 z-50 w-48 dark:bg-base-800 dark:border-base-700" data-simplebar x-cloak x-transition x-anchor.bottom-start.offset.4="$refs.rowDropdown{{ dropdown_id }}" x-show="openDropdownId{{ dropdown_id }}"x-on:click.outside="openDropdownId{{ dropdown_id }} = false" {% if value.width or value.height %}style="{% if value.width %}width: {{ value.width }}px;{% endif %}{% if value.height %}height: {{ value.height }}px;{% endif %}"{% endif %}>

My goal is to fix top: 10px; to always have it in the visible area.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions