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

Placeholder of Elements prevent focusing a line on Firefox #3969

Open
BasicallyPolaris opened this issue Jan 13, 2025 · 2 comments
Open

Placeholder of Elements prevent focusing a line on Firefox #3969

BasicallyPolaris opened this issue Jan 13, 2025 · 2 comments
Labels
bug Something isn't working firefox

Comments

@BasicallyPolaris
Copy link

Description

I've encountered an issue in Firefox where hovering over a placeholder in a block element (e.g., Empty H1, Empty H2, etc.) does not allow for single-click focusing. Instead, it requires a double-click or clicking after the placeholder to focus the line.

This behavior is inconsistent with what I observed in Chromium-based browsers, such as Google Chrome, where single-click focusing works as expected.

Browsers Tested:

  • Google Chrome: Functions as expected (single-click focuses the line).
  • Firefox: Requires double-click or clicking after the placeholder to focus.
  • Zen Browser (Firefox-based): Exhibits the same issue as Firefox.

Expected Behavior:

  • Single left mouse click should focus the line immediately.

Actual Behavior:

  • Single left mouse click does not focus the line; a double-click or clicking after the placeholder is necessary.

I would appreciate any insights into why this behavior occurs and if there are any potential fixes.

Reproduction URL

No response

Reproduction steps

1. Open Firefox or Zen-Browser
2. Go 'https://platejs.org/'
3. Add an empty H1 that has a placeholder element
4. Try to focus the line when it isn't focus already by pressing on the placeholder
5. => Focus is not granted like you would except

Plate version

42.0.0

Slate React version

0.112.0

Screenshots

No response

Logs

No response

Browsers

Firefox

@BasicallyPolaris BasicallyPolaris added the bug Something isn't working label Jan 13, 2025
@utkarshh7
Copy link

@zbeyens /Maintainers, I want to address this issue. Could you please guide me?

@12joan
Copy link
Collaborator

12joan commented Jan 22, 2025

I want to address this issue. Could you please guide me?

You can check https://github.com/udecode/plate/blob/main/CONTRIBUTING.md for guidance on getting a local copy of Plate running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working firefox
Projects
None yet
Development

No branches or pull requests

4 participants