Closed Bug 2047669 Opened 2 months ago Closed 1 month ago

text-overflow:ellipsis glitchy on <input> elements

Categories

(Core :: Layout: Form Controls, defect)

Firefox 151
x86_64
Linux
defect

Tracking

()

VERIFIED FIXED
154 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr140 --- unaffected
firefox-esr153 --- verified
firefox152 --- wontfix
firefox153 --- wontfix
firefox154 --- verified

People

(Reporter: tyr.asd, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(4 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:151.0) Gecko/20100101 Firefox/151.0

Steps to reproduce:

This regressed in Firefox 151.

Open following [test html](data:text/html;charset=utf-8,<!doctype html><body><input value="Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit." style="text-overflow:ellipsis;"/></body>): An input element with a relatively long value, and text-overflow: ellipsis.

<input value="Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit." style="text-overflow:ellipsis;"/>

Tested on Linux and Windows. The bug is also present in Firefox beta 152 and nightly 153.0a1 (2026-06-15) (64-Bit).

This was originally reported as https://github.com/openstreetmap/iD/issues/12408

Actual results:

The ellipsis is not rendered at first (the text is just clipped), and if one scrolls through the input element by putting the cursor inside it and pressing the right arrow key, eventually the ellipsis is rendered, but the rest of the text value isn't.

See attached screencast video.

Expected results:

The ellipsis should be shown from the start and the text be rendered correctly while scrolling through the input field text.

OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Summary: text-overflow:ellipsis not applied and glitchy on <input> elements → text-overflow:ellipsis glitchy on <input> elements

The Bugbug bot thinks this bug should belong to the 'Core::Layout: Form Controls' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Layout: Form Controls
Product: Firefox → Core

The severity field is not set for this bug.
:boris, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(boris.chiou)

We've also noticed this bug, especially with different languages that more easily overflow the input width.

Just to restate:

  1. Ellipsis is not present initially.
  2. Moving the cursor in either direction and hitting the left/right edges can cause the input to go blank and display the overflow ellipsis.

An additional repro: https://codepen.io/editor/isaacbraun/pen/019e8fc2-d603-75a6-860f-af3eda1e4963

Assignee: nobody → emilio
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(boris.chiou)
Keywords: regression
Regressed by: 2031757

Set release status flags based on info from the regressing bug 2031757

This is somewhat similar to bug 2045660, except I don't think we can make it work without special-casing.

Flags: needinfo?(emilio)
See Also: → 2045660

Unfortunately, I think we need to special-case this, since we don't want
to set overflow: clip on the internal editor like we do for
::placeholder.

Draw the ellipsis only when the input is not scrolled, which matches
other browsers and is simpler (otherwise the ellipsis would scroll).

Fix the caret check to deal with shadow dom, which would've kinda saved
us a bit here.

Forgot to mention this bug is observed on: 152.0.6 (aarch64), MacOS Tahoe 26.5.1 (25F80)

Sure, it's reproducible across platforms, but we're not going to uplift the fix to 152.

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/61379 for changes under testing/web-platform/tests

Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch

Upstream PR merged by moz-wptsync-bot

Regressions: 2056633
QA Whiteboard: [qa-triage-done-c155/b154]

Worth requesting uplift to Beta (153) and esr153, perhaps?

Flags: needinfo?(emilio)
See Also: → 2058698, 2059435

Beta is 154 which has the fix right? But sure.

Flags: needinfo?(emilio)

Unfortunately, I think we need to special-case this, since we don't want
to set overflow: clip on the internal editor like we do for
::placeholder.

Draw the ellipsis only when the input is not scrolled, which matches
other browsers and is simpler (otherwise the ellipsis would scroll).

Fix the caret check to deal with shadow dom, which would've kinda saved
us a bit here.

Original Revision: https://phabricator.services.mozilla.com/D312691

Attachment #9621240 - Flags: approval-mozilla-esr153?

(In reply to Emilio Cobos Álvarez [:emilio] from comment #16)

Beta is 154 which has the fix right? But sure.

Uh, yeah, sorry - I can't count.

Duplicate of this bug: 2058698
Attachment #9621240 - Flags: approval-mozilla-esr153? → approval-mozilla-esr153+
See Also: 2058698

Hello! I can confirm that the issue is fixed with firefox 154.0b6 153.1.0esr on Ubuntu 24.04 and MacOS 15.7.7.

I will update the flags and status of this issue accordingly.

Have a nice day

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triage-done-c155/b154] → [qa-triage-done-c155/b154][qa-ver-done-c155/b154]
Duplicate of this bug: 2059435
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: