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

When using a placeholder, cursor doesn't appear on a single click #57

Open
shankardevy opened this issue Jan 6, 2021 · 1 comment
Open

Comments

@shankardevy
Copy link

Step to reproduce:

  1. Configure editor with a header as below:
  tools: {
    header: {
      class: Header,
      config: {
        placeholder: 'Enter a header',
        levels: [2, 3, 4],
        defaultLevel: 2
      }
    },
}
  1. Create a header but do not enter any text
  2. Move to next block and you will see the the placeholder "Enter a header" now as it's empty.
  3. Now click on "Enter a header" to start typing. Error: The placeholder text vanishes but there is no cursor on the editor to accept text input.
  4. Click again on the blank area where the placeholder text was to have the cursor. Now the header block accepts text input.

Expected behaviour: Clicking on placeholder text should immediately provide a cursor and start accepting text input without requiring the user to click the blank area again.

@Jak-Ch-ll
Copy link

I created a pull-request to fix it.

In the meantime, you can add the following code into your own css as a workaround:

.ce-header[contentEditable="true"][data-placeholder]::before {
  pointer-events: none;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants