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

Last word of character Korean isn't sent #12181

Closed
stvkim opened this issue Feb 1, 2020 · 11 comments
Closed

Last word of character Korean isn't sent #12181

stvkim opened this issue Feb 1, 2020 · 11 comments

Comments

@stvkim
Copy link

stvkim commented Feb 1, 2020

Description

The last word of character Korean isn't sent

Riot Browser

riot_browser

Riot Desktop

riot_desktop_windows
Similar previous issue : #5495

Steps to reproduce

  • Change to any Korean input method
  • Type a sentence and press enter without typing 'space', ' . ' kind of character which is shared with English keyboard

Version information

  • Platform: web and Desktop
  • Browser: Chrome
  • OS: Windows 10
  • Desktop Version: 1.5.8
@Fnux
Copy link

Fnux commented Mar 22, 2020

Issue confirmed on MacOS / Chrome / Riot 1.5.10.

CC @verysanghee

@Fnux
Copy link

Fnux commented Mar 23, 2020

Reading on previous issues:

let the record show that we're solving this by moving away from Slate to a lightweight editor we wrote ourselves called CIDER. Please help us test it by going to riot.im/develop and turning on the new editor in Labs in Settings, and hopefully almost all of these issues are resolved.

@Fnux
Copy link

Fnux commented Mar 23, 2020

I was able to reproduce on Fedora 31 / Qutebrowser with qtwebengine backend (= chromium) but not on Firefox, using the ibus-hangul input method.

Firefox might be the workaround for the time being.

@Fnux
Copy link

Fnux commented Mar 23, 2020

From https://github.com/matrix-org/matrix-react-sdk/blob/470cb2c05e0d0be3573e171fadc3e81db8344a05/src/components/views/rooms/BasicMessageComposer.js#L187 :

    // some browsers (Chrome) don't fire an input event after ending a composition,
    // so trigger a model update after the composition is done by calling the input handler.

    // however, modifying the DOM (caused by the editor model update) from the compositionend handler seems
    // to confuse the IME in Chrome, likely causing https://github.com/vector-im/riot-web/issues/10913 ,
    // so we do it async

    // however, doing this async seems to break things in Safari for some reason, so browser sniff.

@bwindels
Copy link
Contributor

Oooops, just saw I missed this ticket. @Heejoong Could you please type the same sequence (under Simple DOM contenteditable) in https://danburzo.github.io/input-methods/index.html and post here either a screenshot of the complete list or an export of the website?

@bwindels
Copy link
Contributor

@Fnux thank you for your research. Feel free to post the above as well for your reproduction scenario with Qutebrowser.

@Fnux
Copy link

Fnux commented Mar 24, 2020

Qutebrowser uses chromium as a backend ;-)

qutebrowser v1.10.1
Backend: QtWebEngine (Chromium 73.0.3683.105)
Qt: 5.13.2

Screenshot from 2020-03-24 08-58-49

As you can see above, there is no compositionend event when ibus is not sure of your input (a hangul character can be generated from multiple latin characters, the mapping is not prefix-free).

@bwindels thanks for your help! Tell me if there is anything I can do (you can ping me on #riot-dev).

@bwindels
Copy link
Contributor

Right, it was my assumption that every IME would fire a compositionend event after entering what is considered a meaningful unit in a given language (character or word). If that's not always clear cut (e.g. current composition makes sense on it's own but it also makes sense to append more) I guess that will need some extra work to work well. I guess pressing enter would also finish the composition, but we need to preventDefault() on that event so you don't add a newline when sending a message. Hmm, not sure, will have a think.

In the meantime, could you record the above log again while pressing enter after typing your sequence? Just to see if there is a compositionend event then.

@Fnux
Copy link

Fnux commented Mar 24, 2020

Yes, there's a compositionend event in that case (at least on Linux / IBUS).

@Fnux
Copy link

Fnux commented Apr 11, 2020

Might be fixed by matrix-org/matrix-react-sdk#4339 ? I'll have to test.

@MadLittleMods
Copy link
Contributor

Thanks for linking the PR that might have fixed this! I'm unable to reproduce the bug now on Windows 10 and macOS 😀

이제 타이핑이 됩니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants