powercat-creator-kit icon indicating copy to clipboard operation
powercat-creator-kit copied to clipboard

[BUG]: SetFocus() Doesn't Work on Any Creative Kit Controls

Open sperry1625 opened this issue 2 years ago • 4 comments

Describe the bug I get an error when I try to SetFocus() to a CreativeKit control. The control is not in a gallery or in another container. It is grouped with other controls, but a group is not a container.

To Reproduce Steps to reproduce the behavior:

  1. Drop a picker, panel, or other CreativeKit control on a Screen
  2. Drop a label on the screen
  3. Group the controls from step 1 and step 2 (This is not necessary, but it is what I have done)
  4. Drop a button on the same screen
  5. In the OnSelect() for the button add a SetFocus() to one of the controls added in step 1
  6. See error

Expected behavior No error and the SetFocus() to work

Screenshots image

Additional context This works on any regular controls that are in the same place.

sperry1625 avatar Sep 07 '23 11:09 sperry1625

Thanks for the great suggestion. SetFocus() requires additional work that was not initially scoped. I will validate whether SetFocus is supported for components.

Were you able to try out the SetFocus implementation provided in docs? https://learn.microsoft.com/en-us/power-platform/guidance/creator-kit/setfocus

denise-msft avatar Sep 21 '23 19:09 denise-msft

@sperry1625 just wanted to follow up and check in - did the SetFocus using a variable work for you?

denise-msft avatar Nov 20 '23 18:11 denise-msft

@denise-msft, I have to retest. I believe IO have tried the SetFocus as described and it is not supported in all controls.

I will retest my scenario and let you know.

Regards,

SP

sperry1625 avatar Nov 28 '23 20:11 sperry1625

@sperry1625 please let us know if this is not working when you have a chance to try it out.

denise-msft avatar Feb 07 '24 07:02 denise-msft

Since we haven’t received a response, we’re closing this case. Please let us know if you need additional help by reopening the issue.

denise-msft avatar Aug 30 '24 23:08 denise-msft