mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-01-17 13:38:37 +01:00
fix: no composing text inserted on mac wechat browser (#5497)
* fix: no composing text inserted on mac wechat browser * chore: add changeset * Update packages/slate-react/src/utils/environment.ts --------- Co-authored-by: wei lingfeng <lfwei@inftech.ai> Co-authored-by: Dylan Schiemann <dylan@dojotoolkit.org>
This commit is contained in:
parent
a25d7a40e5
commit
76ba375983
5
.changeset/grumpy-seahorses-love.md
Normal file
5
.changeset/grumpy-seahorses-love.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
'slate-react': patch
|
||||
---
|
||||
|
||||
fix the bug that user cannot input chinese on mac wechat browser.
|
@ -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' &&
|
||||
/.*(?<!Mac)Wechat/.test(navigator.userAgent)
|
||||
|
||||
// Check if DOM is available as React does internally.
|
||||
// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js
|
||||
|
Loading…
x
Reference in New Issue
Block a user