Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: onSelect does not fire when contentEditable is set to "plaintext-only" #29813

Open
agdhruv opened this issue Jun 8, 2024 · 1 comment
Open
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@agdhruv
Copy link

agdhruv commented Jun 8, 2024

React version: 18

Steps To Reproduce

  1. Create a div with `contentEditable="plaintext-only".
  2. Define an onSelect event handler.
  3. It does not fire upon interacting with the div.

Link to code example: https://codesandbox.io/p/sandbox/unruffled-kapitsa-9rv7z5

The current behavior

onSelect does not fire when contentEditable is set to plaintext-only but fires when it is set to true.

The expected behavior

onSelect should fire for both cases.

@agdhruv agdhruv added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Jun 8, 2024
@m1her
Copy link

m1her commented Jun 10, 2024

The contentEditable="plaintext-only" attribute is not yet fully supported across all browsers, including Firefox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

No branches or pull requests

2 participants