enactjs / sandstone

The set of components for an Enact-based application targeting smart TVs
Apache License 2.0
22 stars 3 forks source link

WRR-4590: Fix to focus the topmost element after scroll by voice control #1702

Closed 0x64 closed 1 month ago

0x64 commented 2 months ago

Checklist

Issue Resolved / Feature Added

When a focusable node inside a scroller is sticked to the top, it cannot be focused after scroll by voice control.

Resolution

The cause is a logic to check if the candidate focus target is inside of a scroller viewport. When a focusable node is touching the boundary of a viewport, the existing logic does not consider the node as visible since it missed simply '='.

I updated to recognize the case that boundaries are the same.

Additional Considerations

I also refine some code with another commit.

Links

WRR-4590

Comments

Enact-DCO-1.0-Signed-off-by: Seungcheon Baek (sc.baek@lge.com)

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 81.59%. Comparing base (17c47f3) to head (267a66d). Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
useScroll/useEvent.js 0.00% 4 Missing and 4 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1702 +/- ## =========================================== - Coverage 81.60% 81.59% -0.02% =========================================== Files 148 148 Lines 6676 6677 +1 Branches 1987 1987 =========================================== Hits 5448 5448 - Misses 935 936 +1 Partials 293 293 ``` | [Flag](https://app.codecov.io/gh/enactjs/sandstone/pull/1702/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enactjs) | Coverage Δ | | |---|---|---| | [](https://app.codecov.io/gh/enactjs/sandstone/pull/1702/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enactjs) | `81.59% <0.00%> (-0.02%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=enactjs#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.