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

Placeholder remains using Japanese IME and style bold #2237

Closed
smura opened this issue Aug 10, 2018 · 2 comments
Closed

Placeholder remains using Japanese IME and style bold #2237

smura opened this issue Aug 10, 2018 · 2 comments

Comments

@smura
Copy link

smura commented Aug 10, 2018

The placeholder remains while using Japanese IME and style bold.

Steps for Reproduction

  1. Visit quilljs.com Interactive Playground
  2. Click and focus on the editor
  3. Enable font style bold using toolbar
  4. Set mode to Hiragana with Japanese IME (IME toolbar shows "あ")
  5. Type "aaa" (Do not type Enter key)

Expected behavior:

  • The placeholder disappears.

Actual behavior:

  • The placeholder remains.

placeholder_with_ime_and_bold

Platforms:

  • Google Chrome 68.0.3440.106
  • Windows 7
  • Microsoft IME 10.1.7601.0

Version:

1.3.6

@smura smura changed the title Placeholder remains using Japanese IME and bold style Placeholder remains using Japanese IME and style bold Aug 10, 2018
@smura
Copy link
Author

smura commented Aug 10, 2018

Solution

https://codepen.io/anon/pen/qyLyqz

The following code solves this problem.

JavaScript:

$(document).on('compositionstart', '.ql-editor', function() {
  $(this).addClass('ql-composition');
});
$(document).on('compositionend', '.ql-editor', function() {
  $(this).removeClass('ql-composition');
});

CSS:

.ql-editor.ql-composition::before {
  visibility: hidden;
}

Note

I recommend do not use display: none insted of visibility: hidden. The issue #1453 will get worse.

@quill-bot
Copy link

Quill 2.0 has been released (announcement post) with many changes and fixes. If this is still an issue please create a new issue after reviewing our updated Contributing guide 🙏

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