Skip to content

Fix text ellipsis on single-mode LookupField (#1287)#1288

Merged
mstijak merged 1 commit intomasterfrom
fix/1287-lookupfield-ellipsis
Apr 20, 2026
Merged

Fix text ellipsis on single-mode LookupField (#1287)#1288
mstijak merged 1 commit intomasterfrom
fix/1287-lookupfield-ellipsis

Conversation

@mstijak
Copy link
Copy Markdown
Member

@mstijak mstijak commented Apr 20, 2026

Summary

  • Wrap {text} in a <span class="cxe-lookupfield-text"> inside the -input div in single-selection mode
  • Move overflow: hidden, text-overflow: ellipsis, white-space: nowrap onto the new -text class
  • Keep -input as display: inline-flex so baseline alignment with adjacent fields/buttons is preserved

The regression was introduced in the "Redo themes" PR (#1281), which changed -input's default display to inline-flex. Flex containers can't apply text-overflow: ellipsis to direct text children (they become anonymous flex items). Moving the ellipsis onto a styleable child span is the fix.

Closes #1287

Test plan

  • Open the LookupField homedocs example, select an option long enough to overflow → text is ellipsized with
  • Place a LookupField next to a Button or text label → baselines align
  • Multi-selection mode unchanged (tags render as before)
  • Placeholder rendering unchanged (still wrapped in the same placeholder span, now inside -text)

The -input element is inline-flex, which preserves baseline alignment
with adjacent fields/buttons but means text-overflow: ellipsis cannot
apply to the container's text directly. Wrap the text/placeholder in
a -text span and apply the ellipsis properties there.

Closes #1287
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 20, 2026

Deploy Preview for cxjs-docs ready!

Name Link
🔨 Latest commit f42b742
🔍 Latest deploy log https://app.netlify.com/projects/cxjs-docs/deploys/69e5e1b1682a200008a69d27
😎 Deploy Preview https://deploy-preview-1288--cxjs-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mstijak mstijak merged commit d2e72c2 into master Apr 20, 2026
5 of 6 checks passed
@mstijak mstijak deleted the fix/1287-lookupfield-ellipsis branch April 20, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ellipsis is not working in Lookpfield

1 participant