-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Don't always focus pane content on Tapped, if the pane is already focused #17174
Conversation
@@ -31,7 +31,8 @@ | |||
<local:SettingContainer x:Uid="Globals_Language" | |||
Visibility="{x:Bind ViewModel.LanguageSelectorAvailable}"> | |||
<ComboBox ItemsSource="{x:Bind ViewModel.LanguageList}" | |||
SelectedItem="{x:Bind ViewModel.CurrentLanguage, Mode=TwoWay}"> | |||
SelectedItem="{x:Bind ViewModel.CurrentLanguage, Mode=TwoWay}" | |||
Style="{StaticResource ComboBoxSettingStyle}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a drive-by that I discovered while investigating.
@@ -11,7 +11,7 @@ Licensed under the MIT license. | |||
#include <conattrs.hpp> | |||
#include "MySettings.g.h" | |||
|
|||
using IFontFeatureMap = winrt::Windows::Foundation::Collections::IMap<winrt::hstring, uint32_t>; | |||
using IFontFeatureMap = winrt::Windows::Foundation::Collections::IMap<winrt::hstring, float>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another drive-by to fix the scratch app build
// Don't focus our content if we're already focused. This prevents a bug | ||
// where tapping on the arrow in a ComboBox will land in our Tapped handler, | ||
// and if we steal focus from the ComboBox, it won't open. See GH#17062 | ||
if (WasLastFocused()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way for us to check if focus is currently inside our pane? Rather than us trying to remember it.
Co-authored-by: Leonard Hecker <lhecker@microsoft.com>
You'll never believe this. Clicking on the dropdown button on a ComboBox doesn't set
e.Tapped = true
. It bubbles up, and lands in ourPane
'sBorder
's tapped handler. And in there, we yeet focus to the first content. We end up stealing focus from the combobox, and then the combobox doesn't actually open its dropdown.So yea we can just fix that. Easy enough.
Closes #17062