w3c / w3c/csswg-drafts

[cssom] scroll event support for textearea and input[type=text] elements

Open
#4,376 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cssom-1
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

Hello,

Can the scroll event support for textarea and input[type=text] elements be specified?

Current scroll event support:

browser input[type=text] textarea[wrap=off]
Safari - +
Chrome - +
Firefox + +
Edge + +

update: Chrome 111 does fire the event, Safari 16.1 still does not.

It seems, all these browsers also support scrollLeft property for those elements.

I have opened an issue at https://bugs.chromium.org/p/chromium/issues/detail?id=1007153#c3 .

I am trying to make a text editing widget with a syntax highlighting based on a transparent input element with non-transparent caret (caret-color/-webkit-fill-text-color).
May be, the use case is wrong, and I should try to use contenteditable=plaintext-only, scrollbar-width: none; and do something to prevent line breaks (btw, what ?), but the browser support is not good now.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the issue's browser-support table and the linked Chromium report. Determine whether CSSOM should specify scroll events for textarea and input[type=text] elements, accounting for the reported Safari and Chrome behavior. Done means reaching and recording a clear specification decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.