You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
A clear and concise description of what the bug is.
Recording
A GIF or video showing the issue happening. (If you don't include this, there's a very good chance your issue will be closed, because it's much too hard to figure out exactly what is going wrong, and it makes maintenance much harder.)
Change IME to default composition lang. like 'Chinese'
Input some word, like 'zhongwen'
Click to pick word, end composition
See error
Expectation
Input some composition lang. at empty editor
Environment
Slate Version: 0.103.0
Slate React: 0.105.0
Operating System: iOS
Browser: Safari
TypeScript Version: 5.0.2
Context
// slate/packages/slate-react/src/components/editable.tsx// it will throw error because when input onCompositionEnd, dom is emptyconstrange=ReactEditor.toSlateRange(editor,targetRange,{exactMatch: false,suppressThrow: false,})
my solution
// postinstall.jsconstpath=require('path');const{ writeFileSync, readFileSync }=require('fs-extra');constreplace=(jsPath)=>{constnpmPath=path.resolve(__dirname,'../',jsPath);constoriginal=readFileSync(npmPath,'utf-8');constreplaced=original.replace('!(IS_ANDROID || IS_IOS)','!IS_ANDROID');if(original===replaced){console.log(`${jsPath} not replacement was made.`);}else{writeFileSync(npmPath,replaced);console.log(`${jsPath} replacement was successful.`);}};replace('node_modules/slate-react/dist/index.js');replace('node_modules/slate-react/dist/index.es.js');
Description
A clear and concise description of what the bug is.
Recording
A GIF or video showing the issue happening. (If you don't include this, there's a very good chance your issue will be closed, because it's much too hard to figure out exactly what is going wrong, and it makes maintenance much harder.)
Sandbox
A link to a sandbox where the error can be reproduced. (You can start from the base sandbox here: https://codesandbox.io/s/slate-reproductions-c7gyg or refer to the Slate website too.)
Steps
To reproduce the behavior:
Expectation
Input some composition lang. at empty editor
Environment
Context
my solution
#5654
The text was updated successfully, but these errors were encountered: