question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Japanese input seems to overlap

See original GitHub issue

Do you want to request a feature or report a bug?

Bug report

What’s the current behavior?

Japanese input seems to overlap in this example (https://www.slatejs.org/#/markdown-preview). Please see following gif. I guess this behavior is occurred by decorator.

untitled

日本語 is duplicated.

My env

Google chrome 71.0.3578.98 Google 日本語入力 2.24.3250.1

What’s the expected behavior?

Japanese input does not overlap with decorator.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
wuxiandiejiacommented, Apr 24, 2019

I found a solution. When you are composing give the mark a new key to force the mark to re-render.

    // in decorateNode method
      if (typeof token != 'string') {
        const dec = {
          anchor: {
            key: startText.key,
            offset: startOffset,
          },
          focus: {
            key: endText.key,
            offset: endOffset,
          },
          mark: {
            type: token.type,
          },
        }
        if (this.state.isComposing) {
          const nodeKey = token.type + Date.now()
          dec.mark.data = {
            key: nodeKey
          }
        }
        decorations.push(dec)
      }
// set key prop in renderMark method
case 'bold':
        return <strong {...attributes} key={mark.data.get('key')}>{children}</strong>
// other mark also can set key
1reaction
wuxiandiejiacommented, Feb 14, 2019

Maybe you can get help on the slate’s slack channel.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upon using Japanese IME conversion input candidates ...
Hello. As shown in the attached image, when using IME conversion with RichEditControl with ribbon, the input candidates overlap with the ...
Read more >
How much overlap is there between the meaning of Japanese ...
Japanese kanji words are based off of older Chinese. So Japanese uses archaic words while the Chinese language has evolved to use different ......
Read more >
“Listenership” in Japanese: An Examination of Overlapping ...
in Japanese, which I call overlapping listener responses. ... type of overlaps seem to be a fairly efficient way of communicating (p.510).
Read more >
Characters overlap when not supported by fallback font (CJK)
Description: It seems like that LibreOffice picks fallback font based on the first character. When the chosen fallback font dose not support ...
Read more >
Input Method Editor API - W3C
This example code hides the suggestion box when IME candidate window may overlap with it. Example 1. <!DOCTYPE html> <html> <head> <style ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found