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

ROU-11295: Fix Tabs issue where getting focused while entering the screen #998

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

gnbm
Copy link
Collaborator

@gnbm gnbm commented Oct 15, 2024

What was happening

  • When entering a screen, the Tabs component received focus unexpectedly when navigating to a screen.
    This occurred when having content positioned above the Tabs causing the page to scroll and bringing the Tabs into focus.
TabsIssue.mp4

What was done

  • A new validation was added to make sure the logic for focusing Tabs headers only happens once Tabs are built.
  • Fixed a Snyk finding where we should be using Number.isNaN(...) instead of isNaN(...).

Test Steps

  1. Go to sample screen 1 by clicking on a link from the home screen
  2. Check that the screen remains at the top
  3. Scroll down to the Tabs
  4. Change to another Tab by clicking on the header
  5. Check that the tab that was opened got focused as expected
  6. Clicking on a button calling the client action SetActiveTab
  7. Check that the target tab that was opened got focused as expected

Note: tests should be performed on a web browser, iOS (native build + PWA) and Android (native build + PWA)

Screenshots

Workaround

Checklist

  • tested locally
  • documented the code
  • clean all warnings and errors of eslint
  • requires changes in OutSystems (if so, provide a module with changes)
  • requires new sample page in OutSystems (if so, provide a module with changes)

@gnbm gnbm added the bug Something isn't working label Oct 15, 2024
@gnbm gnbm requested a review from a team as a code owner October 15, 2024 21:53
Copy link

package.json Show resolved Hide resolved
@gnbm gnbm merged commit 572f143 into dev Oct 16, 2024
14 checks passed
@gnbm gnbm deleted the ROU-11295 branch October 16, 2024 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants