Skip to content

fix: With Chinese IME, placeholder can't disappear.#4511

Open
shiwanjun1995 wants to merge 2 commits into
slab:mainfrom
shiwanjun1995:main
Open

fix: With Chinese IME, placeholder can't disappear.#4511
shiwanjun1995 wants to merge 2 commits into
slab:mainfrom
shiwanjun1995:main

Conversation

@shiwanjun1995

Copy link
Copy Markdown
Transsioner20241129-171449.mp4

@shiwanjun1995

Copy link
Copy Markdown
Author

@luin Any one notice?

@heyang1014

Copy link
Copy Markdown

@luin Any one notice?

Is there a solution for the same problem

@shiwanjun1995

Copy link
Copy Markdown
Author

@luin Any one notice?

Is there a solution for the same problem

有的,监听拼音输入法事件即可

@jkiss

jkiss commented Feb 19, 2025

Copy link
Copy Markdown

@luin Any one notice?

Is there a solution for the same problem

有的,监听拼音输入法事件即可

wow! you save my life! here is my code, it works perfectly:

<div
    ref={editor_ref}
    onCompositionStart={() => {
        const editor_dom = editor_ref.current.querySelector('.ql-editor')
        editor_dom.classList.remove('ql-blank')
    }}
    onCompositionEnd={() => {
        const delta = quill_ref.current.getContents()
        const is_blank = delta.ops.length === 1 && delta.ops[0].insert === '\n'
        const editor_dom = editor_ref.current.querySelector('.ql-editor')
        is_blank && editor_dom.classList.add('ql-blank')
    }}
    data-author="Mr.B"
></div>

work-2025 pushed a commit to work-2025/quill that referenced this pull request Apr 3, 2025
work-2025 pushed a commit to work-2025/quill that referenced this pull request Apr 3, 2025
work-2025 pushed a commit to work-2025/quill that referenced this pull request May 12, 2025
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

Successfully merging this pull request may close these issues.

3 participants