tiptap icon indicating copy to clipboard operation
tiptap copied to clipboard

[Bug]: The active click area is limited to the top area of editor

Open TheBigK opened this issue 10 months ago • 1 comments

Which packages did you experience the bug in?

core

What Tiptap version are you using?

2.3

What’s the bug you are facing?

Steps:

  1. Go to: https://tiptap.dev/docs/editor/examples/default
  2. Remove all the content from the editor
  3. Now click outside the editor to remove the focus from editor (the blinking | should vanish from editor)
  4. Move mouse cursor back inside the editor and click towards the bottom area.

Expected: The editor should get into active mode and start showing the cursor blinking, where user can start typing. Actual: Nothing happens. It's only when you click towards the top area of the editor that TipTap acknowledges the click and starts showing the pointer (indicating that editor is ready to accept input).

On my installation, I set the default height of the editor to about 96 pixels. When users click in the middle of the editor, nothing happens. Only when they click towards the top area of the editor that it becomes active.

The user typically needs to click inside ~20 pixels from the top border to make the editor active.

It's incredibly frustrating.

What browser are you using?

Chrome

Code example

No response

What did you expect to happen?

Expected: The editor should get into active mode and start showing the cursor blinking, where user can start typing.

Anything to add? (optional)

None. All details have been added to the main post.

Did you update your dependencies?

  • [X] Yes, I’ve updated my dependencies to use the latest version of all packages.

Are you sponsoring us?

  • [ ] Yes, I’m a sponsor. 💖

TheBigK avatar Apr 15 '24 07:04 TheBigK

In the docs the black border isn't the editor, it contains the editor (and the toolbar buttons). The editor is actually only this little blue highlighted bit (once all the content has been removed).


Screenshot 2024-04-19 at 14 24 46

In the real world, if you make the actually editor bigger (say a min height of 200px or the view height) then clicking anywhere on the editor will trigger the cursor blinking.


Screenshot 2024-04-19 at 14 28 16

You can add a height in your CSS or add a class to the editor.

codemzy avatar Apr 19 '24 13:04 codemzy

You can also focus the editor when the user clicks somewhere on the wider canvas area.

zakwear avatar Jun 07 '24 01:06 zakwear

Yea this is not an issue with our implementation, you can change the editor to whatever height you like, we left our editor be mostly default because we want to show that we are headless.

nperez0111 avatar Jun 07 '24 13:06 nperez0111