Skip to content

[css-ui] Be more precise about event dispatching of pointer events on the ellipsis #1637

Closed
@frivoal

Description

@frivoal

In the section about text-overflow, CSS-UI states that

Ellipsing only affects rendering and must not affect [...] dispatching of pointer events

This phrasing isn't super clear, and makes me (and @fantasai) wonder if the behavior is fully defined.

If there is only a block element with textual content, then there is no ambiguity and events should go to that element.

However, if there are <span>s or other inline elements in the block element, and that the elided content belonged to them, then it does not seem clear whether the pointer events should be dispatched the (inline) element whose content was elided, or to the block element to which the ellipsis is attached.

My initial reading of the spec made me think it may have intended the events to be dispatched to the element whose content was elided, but the wording does look somewhat ambiguous to me, and current implementations differ: only Firefox dispatches the events to the elided inline element, while Chrome, Safari, and Edge dispatch the events to the block element to which the ellipsis is attached.

My suggestion is to:

  • leave the ambiguous phrasing in level 3, only test that events get dispatched (without checking if they go to the to the inline with elided content first and bubble up to the block or if they get dispatched to the block directly), and accept both the Firefox and the Chrome/Edge/Safari behaviors as conformant for now.
  • decide one way or the other in level 4, clarify, add tests accordingly, and file bugs on the relevant browsers.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions