Skip to content

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

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

shiwanjun1995
Copy link

Transsioner20241129-171449.mp4

@shiwanjun1995
Copy link
Author

@luin Any one notice?

@heyang1014
Copy link

@luin Any one notice?

Is there a solution for the same problem

@shiwanjun1995
Copy link
Author

@luin Any one notice?

Is there a solution for the same problem

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

@jkiss
Copy link

jkiss commented Feb 19, 2025

@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