diff --git a/.changeset/grumpy-seahorses-love.md b/.changeset/grumpy-seahorses-love.md new file mode 100644 index 0000000000..94470070dd --- /dev/null +++ b/.changeset/grumpy-seahorses-love.md @@ -0,0 +1,5 @@ +--- +'slate-react': patch +--- + +fix the bug that user cannot input chinese on mac wechat browser. diff --git a/packages/slate-react/src/utils/environment.ts b/packages/slate-react/src/utils/environment.ts index c66b4421e0..952022957a 100644 --- a/packages/slate-react/src/utils/environment.ts +++ b/packages/slate-react/src/utils/environment.ts @@ -52,9 +52,10 @@ export const IS_FIREFOX_LEGACY = export const IS_UC_MOBILE = typeof navigator !== 'undefined' && /.*UCBrowser/.test(navigator.userAgent) -// Wechat browser +// Wechat browser (not including mac wechat) export const IS_WECHATBROWSER = - typeof navigator !== 'undefined' && /.*Wechat/.test(navigator.userAgent) + typeof navigator !== 'undefined' && + /.*(?