Skip to content
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: the numeric keypad cannot input #298

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

zsien
Copy link
Contributor

@zsien zsien commented May 29, 2024

使用 Keys.forwardTo 代替判断 event.text

Issues: linuxdeepin/developer-center#8495

@zsien zsien requested a review from a team May 29, 2024 05:53
@zsien zsien force-pushed the zs/fix/searchtext branch from 8ed591a to efb5114 Compare May 29, 2024 05:54
@deepin-bot
Copy link

deepin-bot bot commented May 30, 2024

TAG Bot

New tag: 0.7.0
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #297

@zsien zsien force-pushed the zs/fix/searchtext branch from efb5114 to d84cb25 Compare May 30, 2024 07:04
Copy link
Member

@BLumia BLumia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最初没这么写是因为怕 Tab 以及方向键也都被 forward 过去,影响纯键盘交互。这个场景确认没问题吗?

@zsien zsien force-pushed the zs/fix/searchtext branch from d84cb25 to 98b3723 Compare May 31, 2024 01:40
@zsien
Copy link
Contributor Author

zsien commented May 31, 2024

最初没这么写是因为怕 Tab 以及方向键也都被 forward 过去,影响纯键盘交互。这个场景确认没问题吗?

嗯,我测试 tab 和方向键是没问题的

@kegechen kegechen force-pushed the zs/fix/searchtext branch from 98b3723 to 94d5fdd Compare June 4, 2024 06:46
@zsien zsien force-pushed the zs/fix/searchtext branch 2 times, most recently from 3fa68f6 to 0a66394 Compare June 12, 2024 07:58
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BLumia, zsien

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

使用 Keys.forwardTo 代替判断 event.text

Issues: linuxdeepin/developer-center#8495
@kegechen kegechen force-pushed the zs/fix/searchtext branch from 0a66394 to d94a702 Compare June 13, 2024 02:52
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • FullscreenFrame.qmlWindowedFrame.qml中,searchEdit.focusonTextChanged事件中设置为true可能会导致用户无法通过按键清除搜索框内容。
  • BottomBar.qml中,searchEdit.focusonTextChanged事件中设置为true,但没有相应的逻辑来处理用户按下其他键时searchEdit.focus的值。
  • Keys.onPressed事件处理函数中,对event.text的检查使用了字符串字面量"\t\r\0 ",这可能会在不同的环境或输入法设置中导致问题。
  • Keys.forwardTo属性在BottomBar.qml中被添加到bottomBar.searchEdit,但没有相应的处理逻辑来处理这些事件。

是否建议立即修改:

  • 应该立即修改FullscreenFrame.qmlWindowedFrame.qml中的searchEdit.focus设置,以避免潜在的用户体验问题。
  • 应该添加处理逻辑来处理Keys.forwardTo添加到bottomBar.searchEdit的事件,以避免潜在的空指针异常。
  • 应该重新考虑对event.text的检查,使用更通用的方法来处理用户输入,以提高代码的健壮性。
  • 应该确保所有添加到Keys.forwardTo的控件都有相应的处理逻辑,以避免遗漏事件处理。

@kegechen kegechen merged commit a6d4ab2 into linuxdeepin:master Jun 13, 2024
9 of 10 checks passed
@zsien zsien deleted the zs/fix/searchtext branch June 13, 2024 03:31
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