-
Notifications
You must be signed in to change notification settings - Fork 21
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
Input methods (e.g. Chinese) don't work on empty line #11
Comments
Hi @danqing. Thank you for reporting this. Have you tried this on ProseMirror without use-prosemirror? For example, in the editor on the homepage: https://prosemirror.net/? |
Yes I did - it worked fine on prosemirror's site. Thank you @dminkovsky ! |
Thanks for confirming @danqing. I would like to replicate this. Some more questions:
|
That's right.
Yup.
I mean it also happens for other languages that require input methods (e.g. Japanese). But if you are just copy-pasting text, things work fine.
Yes.
iOS works fine. |
@danqing Cool. Pretty important for me to correct this behavior. Thanks again for reporting this. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hmm please ignore this. I thought I had configured this bot not to mark pinned issues stale. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Would you guys be interested in updating the Prosemirror deps, more specifically prosemirror-view? I think it would resolve this issue. It was mentioned here with a patch in v1.18.11. https://discuss.prosemirror.net/t/prosemirror-view-upgrade-caused-chinese-to-be-affected-by-decoration-widget-during-input/2452/7 It would also add better Android support as mentioned here. ProseMirror/prosemirror-view@1a3faa9 I can PR it if you want, but I was unsure how open to it you'd be. |
Hi Dakota, thanks a lot for posting this! That’s great to hear re: this bug
and Android support. Certainly you can PR, but I’m not sure that’s
necessary? The deps are peer dependencies and if I’m not mistaken you can
set the view version to 1.18.1 in your package.json without issue?
Ср, 28 июля 2021 г. в 11:58 PM, Dakota Hipp ***@***.***>:
… Would you guys be interested in updating the Prosemirror deps, more
specifically prosemirror-view? I think it would resolve this issue. It was
mentioned here with a patch in v1.18.11.
https://discuss.prosemirror.net/t/prosemirror-view-upgrade-caused-chinese-to-be-affected-by-decoration-widget-during-input/2452/7
It would also add better Android support as mentioned here.
***@***.***
<ProseMirror/prosemirror-view@1a3faa9>
I can PR it if you want, but I was unsure how open to it you'd be.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABVMZP2HIEETFP5QR57BB3T2DGXDANCNFSM42YEYIFA>
.
|
Yeah, good point. I wasn't seeing the expected updates which made me consider updating, but no need with peerDependencies. I'm still seeing the issue, but I think it may be specific to how I'm using it in a webview. I'll leave the comment though, maybe updating prosemirror-view can help the OP. Thanks for the library! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Was running into this issue with a Japanese IME and found it to be caused by the import { ProseMirror, Handle } from "use-prosemirror";
function Editor(...) {
const handleRef = useRef<Handle>(null);
const [proseState, setProseState] = useState(() => EditorState.create(...));
return (
<ProseMirror
ref={handleRef}
state={proseState}
onChange={(state) => {
setProseState(state);
handleRef.current?.view?.updateState(state);
}}
/>
);
} possibly changing the API for onChange/dispatchTransaction to return the new state that can be imperatively set on the view could fix this issue. |
For languages that require an input method to enter, the first letter isn't picked up:
The text was updated successfully, but these errors were encountered: