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

The GX_EVENT_FOCUS_LOST event is not sent if the parent does not have focus #82

Closed
maxim-lbmv opened this issue Dec 3, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@maxim-lbmv
Copy link

maxim-lbmv commented Dec 3, 2023

Describe the bug
The GX_EVENT_FOCUS_LOST event is not sent if the parent does not have focus

For example, there is the following hierarchy

  • Widget 1
    • Widget 1.1
      • Widget 1.1.1
    • Widget 1.2

Widget 1.1 does not accept focus. Focus on Widget 1.1.1. If you click on Widget 1.2, then Widget 1.1.1 will not receive the GX_EVENT_FOCUS_LOST event. This happens because when focus is transferred, there is a widget with a common parent, in our case it is Widget 1.1 and the focus loss event is passed to it, but it does not pass it to children because it does not accept focus.

Please also mention any information which could help others to understand
the problem you're facing:

  • What target device are you using? Cortex M7
  • Which version of Azure RTOS? 6.1
  • What toolchain and environment? IAR
  • What have you tried to diagnose or workaround this issue? We have to make sure that all widgets accept focus, but this does not work with vertical lists, because widgets there do not accept focus and we have to write special handlers for them so that they pass the focus loss event to children

To Reproduce

  1. Create a project with 4 widgets, with hierarchy and settings, as shown in the description
  2. Add event processing for GX_EVENT_FOCUS_LOST Widget 1.1.1
  3. Click on Widget 1.1.1
  4. Click on Widget 1.2

Expected behavior
Widget 1.1.1 will receive the GX_EVENT_FOCUS_LOST event

Impact
Widget 1.1.1 does not receive GX_EVENT_FOCUS_LOST event

Logs and console output
No

Additional context
No

@maxim-lbmv maxim-lbmv added the bug Something isn't working label Dec 3, 2023
@ting-ms
Copy link
Contributor

ting-ms commented Dec 7, 2023

@maxim-lbmv Thank you for your feedback! We can reproduce the issue and we'll fix it in the future.

@ting-ms
Copy link
Contributor

ting-ms commented Dec 18, 2023

@maxim-lbmv This issue has been fixed in this PR: #92.

@ting-ms ting-ms closed this as completed Dec 18, 2023
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

No branches or pull requests

2 participants