facebook / lexical

Lexical is an extensible text editor framework that provides excellent reliability, accessibility and performance.
https://lexical.dev
MIT License
19.92k stars 1.69k forks source link

Bug: After moving Selection, the small keyboard does not automatically pop up and cannot continue editing #6512

Open sliyoxn opened 3 months ago

sliyoxn commented 3 months ago

Hello, I want to implement a custom image using DecoratorNode. However, I found that if there's only one Image node under the root element, it's quite difficult to insert content before or after it. I discovered that enabling the BlockCursor can solve this issue, but I encountered several strange behaviors during my usage:

  1. When clicking on the blank area of the editor, the BlockCursor does not appear automatically. It only appears if you select the image and then switch using the arrow keys.
  2. I tried using RangeSelection to show the editor's built-in BlockCursor, but I found that even though the BlockCursor moved to the correct position, I still couldn't input content (the virtual keyboard didn't pop up on mobile devices). Only after clicking again could I focus and input content.
  3. click image,the virtual keyboard did not pop up when focused

Steps To Reproduce

Screenshots

pc: https://github.com/user-attachments/assets/b40c7863-eca5-4181-979e-3ac6048750c4 mobile: https://github.com/user-attachments/assets/eb32f292-2d0e-4098-9c30-adc264b00aee

Device Info

Smartphone: Device: Xiaomi14Pro OS: HyperOs 1.0.45 Browser: Chrome

Pc: Device: MacBook Pro 2021 OS: 14.4.1 Browser: Chrome 126.0.6478.183

The expected behavior

Impact of fix

Fixing this issue can improve the usability of custom nodes

keiseiTi commented 3 months ago

About the expected behavior「clicking on the blank area of the editor, the blockCursor can appear automatically」 You can insert additional paragraph node