-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
fix: fix wxwork(wechatwork) ime can not work #5496
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 004e14f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evilbs could you please add a changeset per the guidelines and then we can release this update? Thanks
@dylans I have added the changeset. Please review it again. Thank you. |
Slate Can't input Chinese correctly and it carshed on wechat(windows wechat/mac wechat/wxwork) 7129_1692211073.mp4I fixed it and it ok on wechat(windows wechat/mac wechat/wxwork...) 7130_1692211252.mp4so i want remove restrictions on wechat. @dylans Please review it again. Thank you. |
@dylans PR #5497 doesn't resolve my issue. it is only resolved mac wechat. my case happend on window wechat browser and window wxwork browser. window.wechat.mp4but i found that browser of all platforms of all wechat products have the same problem. i remove the restrictions, all wechat products can work fine. i checked all platforms and all wechat products. |
@evilbs, ok, but in that case it doesn't make sense to completely remove the utility function to check for the Wechat browser, but rather just not to use it here? |
@dylans hi, I have restored the utility function, Just remove the check. |
This is failing our tests as I believe we need to update our minimum TS version. Will try to address this soon. |
Apologies, this one fell off my radar. @evilbs if you have time to clean it up, I'll review and land it. |
Description:
Fix cannot input Chinese on wxwork(wechat work).
Example:
wechat and wxwork useragent:
Wechat usearagent:
Mozilla/5.0 (Linux; Android 13; 22127RK46C Build/TKQ1.220905.001; wv) AppleWebKit/537.36 (KHTML%2C like Gecko) Version/4.0 Chrome/107.0.5304.141 Mobile Safari/537.36 XWEB/5127 MMWEBSDK/20230604 MMWEBID/7189 MicroMessenger/8.0.38.2400(0x28002639) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64 qcloudcdn-xinan
wxwork(wexin work) useraget:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.5304.110 Safari/537.36 Language/zh wxwork/4.1.9 (MicroMessenger/6.2) WindowsWechat MailPlugin_Electron WeMail embeddisk
slate/packages/slate-react/src/components/editable.tsx
Lines 1133 to 1141 in a25d7a4
slate/packages/slate-react/src/utils/environment.ts
Lines 56 to 57 in a25d7a4
/.*Wechat/.test(navigator.userAgent)
This regex will also filter the useragent of the wxwork(weixin work), causing the wxwork unable receive the IME CompositionEnd event then cannot input Chinese.
Checks
yarn test
.yarn lint
. (Fix errors withyarn fix
.)yarn start
.)yarn changeset add
.)