-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix: display IME characters during composition #2263
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for slidev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
@slidev/client
create-slidev
create-slidev-theme
@slidev/parser
@slidev/cli
@slidev/types
commit: |
I am afraid this is too complex and would be hard to understand and maintain. Don't we have a better way to do that? Or at least I think it would be better to move them into a headless component |
I didn't know Furthermore, since the How does this look? Should we further separate this into a headless component? const localContent = ref(content.value)
watch(content, (v) => {
if (v !== localContent.value) {
localContent.value = v
}
})
function onInput(e: Event) {
if (!(e instanceof InputEvent) || !(e.target instanceof HTMLTextAreaElement)) {
return
}
if (e.isComposing) {
localContent.value = e.target.value
}
else {
content.value = e.target.value
}
}
function onCompositionEnd() {
content.value = localContent.value
} |
Yeah let's do a headless component. Thanks! |
@antfu I fixed it. Could you please review it again? |
resolve #2262
Fixed it so that during IME input, values are updated only within the Editor, and once the IME confirms the input, the value is passed to the caller.