Open
fix(View): register click before focus so a View can take keyboard focus #3884
changlpAdd on 22 hours ago
fix(View): register click before focus so a View can take keyboard focus #3884
Open
Merge blocked
22 hours ago Added label: AI检视中
openharmony_ci
22 hours ago Comments:
22 hours ago Comments:
感谢提交 Pull Requests!
Thanks for submitting a pull request.


22 hours ago Added label: dco检查成功
22 hours ago Removed label: AI检视中
22 hours ago Added label: AI未检视
22 hours ago Removed label: AI未检视
22 hours ago Added label: AI检视中
openharmony_ci
22 hours ago Comments:
22 hours ago Comments:
感谢提交 Pull Requests!
Thanks for submitting a pull request.


22 hours ago Removed label: AI检视中
22 hours ago Added label: AI已检视
22 hours ago Removed label: AI已检视
22 hours ago Added label: AI检视中
openharmony_ci
22 hours ago Comments:
22 hours ago Comments:
感谢提交 Pull Requests!
Thanks for submitting a pull request.


22 hours ago Removed label: AI检视中
22 hours ago Added label: AI已检视
20 hours ago Removed label: AI已检视
20 hours ago Added label: AI检视中
openharmony_ci
20 hours ago Comments:
20 hours ago Comments:
感谢提交 Pull Requests!
Thanks for submitting a pull request.


20 hours ago Removed label: AI检视中
20 hours ago Added label: AI已检视
2 hours ago Associated issue: [Bug] [severity: normal] [category: feature] [version: 0.77] [component: component] View with accessible and focusable cannot take keyboard focus when ALL_CONTAINERS_CLICKABLE is OFF
openharmony_ci
2 hours ago Comments:
2 hours ago Comments:
首次触发
门禁构建开始,包含静态检查、代码编译【rnoh_0.77-main编译】,预计在60分钟内完成,门禁结果会同步发送到注册邮箱。您可以通过如下链接跟踪门禁进展:http://dcp.openharmony.cn/workbench/cicd/detail/6aeec32664650f998bf6eb82/runlist


2 hours ago Added label: 静态检查失败
openharmony_ci
2 hours ago Comments:
2 hours ago Comments:
代码门禁未通过
您可以通过如下链接查看门禁报告:http://dcp.openharmony.cn/workbench/cicd/detail/6aeec32664650f998bf6eb82/runlist
静态检查:
| # | check type | result | report |
|---|---|---|---|
| 1 | codeCheck | noPass | >>> |
编译测试:
| # | Device | build result | package |
|---|---|---|---|
| 1 | rnoh_0.77-main | pending | NA |


Change Type
Please check
√next to the corresponding type, only one option can be selected:Change Description
With
ALL_CONTAINERS_CLICKABLEOFF, ArkUI lets a container take keyboard focus by itself only whenNODE_ON_CLICKis registered beforeNODE_FOCUSABLEis written.View::onPropsChangedused to writeNODE_FOCUSABLEforaccessiblebefore registering the click forfocusable, so a View with bothaccessible={true}andfocusable={true}could not take keyboard focus.CustomNode::setClickRegisteredregisters or unregistersNODE_ON_CLICKand does not writeNODE_FOCUSABLE. In OFF mode, the click registration follows thefocusableprop only.NODE_FOCUSABLEis then set toaccessible || focusable.accessible={true}alone writesNODE_FOCUSABLEand does not register a click. The View cannot take keyboard focus, and a screen-reader double tap stays a touch.accessible={true}withfocusable={true}registers the click first, then writesNODE_FOCUSABLE. The View can take keyboard focus, and a screen-reader double tap is a click.focusable={true}registers the click and writesNODE_FOCUSABLE. The View can take keyboard focus, and a screen-reader double tap is a click.focusableunset and mount its own focusable child.ON mode is unchanged: the constructor still registers
NODE_ON_CLICK, andsetFocusableonly writesNODE_FOCUSABLE.This adds the internal C++ method
CustomNode::setClickRegistered. No JS prop is added or removed. The behavior applies to RN View keyboard focus and screen-reader double tap whenALL_CONTAINERS_CLICKABLEis OFF. The same rules are documented in the Chinese and English usage FAQs.Test Steps
Test reference: gtest: rnoh_customnode_focusable_test, rnoh_customnode_focusable_on_test, rnoh_view_ci_props_test, rnoh_view_ci_props_on_test
Host gtest files for this behavior are not on this version line. The same cases cover it on 0.84 and 0.86.
ALL_CONTAINERS_CLICKABLEOFF, reach afocusable={true}View from the keyboard.accessible={true}withoutfocusabledoes not registerNODE_ON_CLICK.accessible={true}andfocusable={true}registers click, then sets focusable.Test Status
Pre-merge Self-Check
Linked Issue
Close #3539