craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.21k stars 616 forks source link

[4.x]: selectize dropdown can get cut off if it's the last field #14159

Closed i-just closed 6 months ago

i-just commented 6 months ago

What happened?

Description

The issue described here: https://github.com/craftcms/cms/issues/12976 is back. When selectize field (Dropdown or Multi-select) is close to the bottom of the screen, the dropdown opens to the bottom, and some options are cut off. It happens in the full page view and the slideout.

Steps to reproduce

  1. Create a Dropdown or Multi-select field, and add multiple options to it (enough for the dropdown to be fairly long, e.g. 8 options).
  2. Add that field at the bottom of the tab for e.g. Entry Type
  3. Open an entry of that type and resize the browser window so that the field is near the bottom of the window.
  4. Open the dropdown.

Expected behavior

The dropdown should show above the field if there’s not enough space to show it underneath.

Actual behavior

The dropdown always opens at the bottom of the field. (In the screenshots below, there are options A through to H.)

Screenshot 2024-01-18 at 15 30 15 Screenshot 2024-01-18 at 15 30 57

Craft CMS version

4.5.+

PHP version

n/a

Operating system and version

n/a

Database type and version

n/a

Image driver and version

n/a

Installed plugins and versions

-

brandonkelly commented 6 months ago

Resolved via #14160