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(Keyboard): currentKeyboard not undefined check before calling functions on it #474

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

slhay28
Copy link
Contributor

@slhay28 slhay28 commented Feb 19, 2024

Description

The getFocused method called a capitalization function on the currentKeyboard which in some cases hadn't been set yet. This fix checks to see if there is a currentKeyboard before calling the capitalize function.

References

LUI-1340

Testing

Have been unable to reproduce in storybook or playground.
I tested this by...

  • copying the Keyboard file over to the flex-app
  • made the necessary import changes to import component types from '@lightning/ui'
  • changed HoriziontalKeyboard in the flex-app to use this keyboard file rather than the one from '@lightning/ui'
  • run the flex-app with yarn start (you might need a new .env file so let me know if you need this)
  • on the top of the browser when running you will see a search icon. Click this
  • you will see nothing loads and the console shows a charAt error the line change in this pr in the Keyboard (the get _currentKeyboard method) is changed to this new line

Automation

Checklist

  • all commented code has been removed
  • any new console issues have been resolved
  • code linter and formatter has been run
  • test coverage meets repo requirements
  • PR name matches the expected semantic-commit syntax

@svc-lightning-ui-components
Copy link
Collaborator

Test Execution Failed.

@ImCoolNowRight ImCoolNowRight force-pushed the fix/Keyboard-render-race branch from 8504172 to cfd622d Compare February 20, 2024 14:49
@slhay28 slhay28 merged commit 76c4e49 into develop Feb 20, 2024
8 of 9 checks passed
@slhay28 slhay28 deleted the fix/Keyboard-render-race branch February 20, 2024 15:56
@svc-lightning-ui-components
Copy link
Collaborator

Test Execution Failed.

svc-lightning-ui-components pushed a commit that referenced this pull request Feb 23, 2024
# [@lightningjs/ui-components-v2.20.2](https://github.com/rdkcentral/Lightning-UI-Components/compare/@lightningjs/ui-components-v2.20.1...@lightningjs/ui-components-v2.20.2) (2024-02-23)

### Bug Fixes

* Add marquee property to title in Card ([#469](#469)) ([ae187ec](ae187ec))
* **Keyboard:** adding a check if currentFormat is valid before calling capitalize on it ([#474](#474)) ([76c4e49](76c4e49))
* **Keyboard:** make row render when key is empty ([#472](#472)) ([334bf88](334bf88))
* **MetadataBase:** fix layout order ([#471](#471)) ([b77db31](b77db31))
* **Title:** do not render title textbox unless there is a title present ([#475](#475)) ([81549db](81549db))
* **Toggle:** fillInverseDisabled typo in styles ([#473](#473)) ([4ab5c0f](4ab5c0f))
@svc-lightning-ui-components
Copy link
Collaborator

🎉 This PR is included in version @lightningjs/ui-components-v2.20.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants