mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-07-31 20:40:19 +02: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:
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 =
|
export const IS_UC_MOBILE =
|
||||||
typeof navigator !== 'undefined' && /.*UCBrowser/.test(navigator.userAgent)
|
typeof navigator !== 'undefined' && /.*UCBrowser/.test(navigator.userAgent)
|
||||||
|
|
||||||
// Wechat browser
|
// Wechat browser (not including mac wechat)
|
||||||
export const IS_WECHATBROWSER =
|
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.
|
// Check if DOM is available as React does internally.
|
||||||
// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js
|
// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js
|
||||||
|
Reference in New Issue
Block a user