-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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: line break cause textareaItem word count corrupt for iOS (#1265) #2825
fix: line break cause textareaItem word count corrupt for iOS (#1265) #2825
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2825 +/- ##
=========================================
Coverage ? 59.37%
=========================================
Files ? 92
Lines ? 2218
Branches ? 635
=========================================
Hits ? 1317
Misses ? 895
Partials ? 6
Continue to review full report at Codecov.
|
components/textarea-item/index.tsx
Outdated
@@ -4,6 +4,7 @@ import React from 'react'; | |||
import TouchFeedback from 'rmc-feedback'; | |||
import { TextAreaItemPropsType } from './PropsType'; | |||
import { Omit } from '../_util/types'; | |||
import { IS_IOS_NOT_DEV_TOOLS } from '../_util/exenv'; |
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.
用 IsIOS 不可以么
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.
桌面devtools模拟ios会有问题,这个针对真机的一个bug
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.
#1265 里我有提及原因,可以使用真机测试一下
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.
可能描述的不清晰,我补充一下,该问题只有在iOS真机下maxlength会出现问题,使用浏览器的devtools并不会出现,因此需要做特殊处理判断不是devtools模拟的,否则devtools模拟会出问题
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.
@ziluo 看一下有没有必要加这一个。影响范围是 dev-tools
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.
@ziluo 你看看需不需要加上这个变量,dev-tools
需不需要照顾到
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.
暂不考虑dev-tools
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.
@doxiaodong 需要我close之后,修改后再提PR吗? 如果不判断在dev-tools的iOS的情况下,整个maxLength的限制会失效哦
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.
@Roxyhuang 你直接改成 IsIOS 呀,不需要 close,不过可以加一条注释说明
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.
@doxiaodong 可以了,麻烦review一下,谢谢
1b34bb9
to
d24df2f
Compare
d24df2f
to
2d22187
Compare
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.
First of all, thank you for your contribution! :-)
Please makes sure that these checkboxes are checked before submitting your PR, thank you!
npm run lint
and fix those errors before submitting in order to keep consistent code style.Extra checklist:
if isBugFix :
elif isNewFeature :
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)