Skip to content

fix: input 光标设置错误 - #17476

Merged
tutuxxx merged 3 commits into
NervJS:mainfrom
oasis-cloud:fix_input_cursor
Mar 27, 2025
Merged

fix: input 光标设置错误#17476
tutuxxx merged 3 commits into
NervJS:mainfrom
oasis-cloud:fix_input_cursor

Conversation

@oasis-cloud

Copy link
Copy Markdown
Contributor

这个 PR 做了什么? (简要描述所做更改)

<Input style={{background: '#f0f0f0'}}  defaultValue={8888888888} cursor={0} />
<Input style={{background: '#f0f0f0'}}  defaultValue={8888888888} cursor={2} />

在上面的 demo 中,cursor 无法正确设置。除此外,当进行非文本末尾的删除操作后,光标会跳回最后一位。

这个 PR 是什么类型? (至少选择一个)

  • 错误修复(Bugfix) issue: fix #

这个 PR 涉及以下平台:

  • 所有小程序

@codecov

codecov Bot commented Mar 24, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.86%. Comparing base (8256f13) to head (b0ebb8c).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #17476   +/-   ##
=======================================
  Coverage   57.86%   57.86%           
=======================================
  Files         468      468           
  Lines       26458    26458           
  Branches     5812     5829   +17     
=======================================
  Hits        15309    15309           
+ Misses       9665     9573   -92     
- Partials     1484     1576   +92     
Flag Coverage Δ
taro-cli 72.37% <ø> (ø)
taro-runtime 59.87% <ø> (ø)
taro-web 49.68% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 28 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@qhanw

qhanw commented Mar 25, 2025

Copy link
Copy Markdown

该问题不仅仅是删除时会出现,在输入框非文本末尾位置添加内空时,在真机上光标也会跳回最后一位,不知道是不是相同问题。

@tutuxxx
tutuxxx self-requested a review March 26, 2025 12:16
@tutuxxx tutuxxx added this to the 4.0.10 milestone Mar 26, 2025
@fkc-alt

fkc-alt commented Mar 26, 2025

Copy link
Copy Markdown

请问修复好了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants