Commit 5999810
committed
fix: prevent focus issues during mouse wheel page navigation
1. Added wheelFocusSink Item to capture focus during mouse wheel
scrolling
2. Introduced pageChangedByKeyboard property to distinguish between
keyboard and mouse wheel page changes
3. Modified onWheel handler to transfer focus to wheelFocusSink before
page navigation
4. Updated currentItemChanged handler to only reset focus when page
change was triggered by keyboard
5. Ensured pageChangedByKeyboard is set to true for all keyboard
navigation scenarios
Log: Fixed focus behavior when using mouse wheel to navigate between
folder pages
Influence:
1. Test mouse wheel scrolling between folder pages - focus should not
jump to applications
2. Verify keyboard navigation (arrow keys, Tab) still correctly focuses
applications
3. Test mixed usage of mouse wheel and keyboard navigation
4. Verify focus behavior when switching pages with both input methods
5. Test edge cases like single page folders and multi-page navigation
fix: 修复鼠标滚轮翻页时的焦点问题
1. 添加 wheelFocusSink Item 用于在鼠标滚轮滚动时捕获焦点
2. 引入 pageChangedByKeyboard 属性区分键盘和鼠标滚轮触发的翻页
3. 修改 onWheel 处理程序,在页面导航前将焦点转移到 wheelFocusSink
4. 更新 currentItemChanged 处理程序,仅在键盘触发翻页时重置焦点
5. 确保所有键盘导航场景都将 pageChangedByKeyboard 设置为 true
Log: 修复使用鼠标滚轮在文件夹页面间导航时的焦点行为
Influence:
1. 测试鼠标滚轮在文件夹页面间滚动 - 焦点不应跳转到应用程序
2. 验证键盘导航(方向键、Tab键)仍能正确聚焦应用程序
3. 测试混合使用鼠标滚轮和键盘导航的情况
4. 验证使用两种输入方法切换页面时的焦点行为
5. 测试边缘情况,如单页文件夹和多页导航
PMS: BUG-3431431 parent b178a28 commit 5999810
1 file changed
Lines changed: 20 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
177 | 184 | | |
178 | 185 | | |
179 | 186 | | |
| |||
255 | 262 | | |
256 | 263 | | |
257 | 264 | | |
| 265 | + | |
| 266 | + | |
258 | 267 | | |
259 | 268 | | |
260 | 269 | | |
| |||
281 | 290 | | |
282 | 291 | | |
283 | 292 | | |
284 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
285 | 296 | | |
286 | 297 | | |
287 | | - | |
| 298 | + | |
288 | 299 | | |
| 300 | + | |
| 301 | + | |
289 | 302 | | |
290 | 303 | | |
291 | 304 | | |
| |||
417 | 430 | | |
418 | 431 | | |
419 | 432 | | |
| 433 | + | |
420 | 434 | | |
421 | 435 | | |
422 | 436 | | |
| |||
444 | 458 | | |
445 | 459 | | |
446 | 460 | | |
| 461 | + | |
447 | 462 | | |
448 | 463 | | |
449 | 464 | | |
| |||
500 | 515 | | |
501 | 516 | | |
502 | 517 | | |
| 518 | + | |
503 | 519 | | |
504 | 520 | | |
505 | 521 | | |
| |||
527 | 543 | | |
528 | 544 | | |
529 | 545 | | |
| 546 | + | |
530 | 547 | | |
531 | 548 | | |
532 | 549 | | |
| |||
0 commit comments