Skip to content

Xaml Islands Fixes for FocusManager.GetFocusedElement and ContentDial… #3352

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

Merged
merged 3 commits into from
Jun 24, 2020

Conversation

azchohfi
Copy link
Contributor

@azchohfi azchohfi commented Jun 16, 2020

Fixes #3340 #3216 #3205

Fixed issues with any class using FocusManager.GetFocusedElement when running inside the context of a Xaml Island, as well as one last issue with TextToolbar's ContentDialog not having it's XamlRoot set, also in the context of a Xaml Island.

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

FocusManager.GetFocusedElement() always returns null when executed in the context of a Xaml Island, so any class that leverages this method will not work properly on Xaml Islands, as reported in #3340.

What is the new behavior?

If XamlRoot is available, calls the new overload FocusManager.GetFocusedElement(XamlRoot), with the appropriate XamlRoot.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Pull Request has been submitted to the documentation repository instructions. Link:
  • Sample in sample app has been added / updated (for bug fixes / features)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes

@ghost
Copy link

ghost commented Jun 16, 2020

Thanks azchohfi for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

@ghost ghost assigned Kyaa-dost Jun 16, 2020
@ghost ghost added the bug 🐛 An unexpected issue that highlights incorrect behavior label Jun 16, 2020
@michael-hawker michael-hawker mentioned this pull request Jun 16, 2020
70 tasks
@michael-hawker
Copy link
Member

@azchohfi can you link to the blog post here or in the issue with the list of all the changes XAML Islands needs? Will be good for future reference to have it linked to here if folks stumble upon this in the future.

Copy link
Member

@michael-hawker michael-hawker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of minor issues/comments on manual tests, but otherwise looks great, thanks!

Copy link
Contributor

@Kyaa-dost Kyaa-dost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 🚀 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants