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

Focus is not set properly after clicking include/exclude comboBox #182

Open
Pressacco opened this issue Jul 25, 2021 · 6 comments · Fixed by #194
Open

Focus is not set properly after clicking include/exclude comboBox #182

Pressacco opened this issue Jul 25, 2021 · 6 comments · Fixed by #194
Assignees
Labels
bug_report A documented but unresolved software problem. known_issue A documented software problem that cannot be fixed.

Comments

@Pressacco
Copy link
Member

Pressacco commented Jul 25, 2021

Steps to Reproduce

  1. Start Weevil
  2. Open a log file
  3. try to click on the Inclusive or Exclusive filter comboboxes

Expected Result

  • CombBox should receive focus.

Actual Result

  • CombBox does not receive focus.

Background

This bug started immediately after upgrading MaterialDesignInXaml to 4.1

At this point it might be worthwhile to consider downgrading.

@Pressacco Pressacco added the bug_report A documented but unresolved software problem. label Jul 25, 2021
@Pressacco Pressacco added this to the 2.8.0 milestone Jul 25, 2021
@Pressacco Pressacco self-assigned this Jul 25, 2021
@Pressacco
Copy link
Member Author

Relates to: #36

@Pressacco
Copy link
Member Author

Pressacco commented Aug 29, 2021

Observations

  • Does not appear to be an Enabled problem.
  • there is a small area on the far left of the ComboBox
    • if you click here, you can set the focus
    • the remaining 95% of the visual area to the right... clicking does nothing
  • HINT: this might be a WPF style related problem

@Pressacco Pressacco pinned this issue Aug 29, 2021
@Pressacco
Copy link
Member Author

Caused by: #32

@Pressacco
Copy link
Member Author

Relates to Material Design In Xaml: ComboBox XAML

@Pressacco
Copy link
Member Author

Pressacco commented Sep 2, 2021

Observations

In the MdixComboBoxBehavior WPF behavior, when you add the following you will see that the toggleButton takes up the entire width of the control.

  • button.Background = Blue;

When you move the mouse to the far left side of the ComboBox you will see that the control will accept focus (i.e. it's clickable). I am fairly certain that this is the TextBox portion of the ComboBox control.

  • PART_EditableTextBox

WPF Snoop shows that the textboxes MinWidth = 10

  • Using Snoop, make the MinWidth = 100... and now the clickable area of the ComboBox is bigger.
  • Might be able to set this property dynamically using:
    • MinWidth="{Binding Path=ContentMinWidth, RelativeSource={RelativeSource AncestorType=wpf:ComboBoxPopup}}

Solutions

  1. Try to fix the behavior using XAML & attached behaviors.
  2. Create a custom ComboBox using
    • TextBox : for data input (i.e. current filter)
    • Button : to display the list of choices (i.e. filter history)
  3. Rollback to MaterialDesignInXaml 4.0
  4. Other?

@Pressacco Pressacco added code_hack Code that addresses a bug or deficiency in a third-party library. and removed code_hack Code that addresses a bug or deficiency in a third-party library. labels Sep 7, 2021
BlueDotBrigadeFounder pushed a commit that referenced this issue Sep 8, 2021
… WPF `ComboBox` will now receive focus when you click on the control. #182
BlueDotBrigadeFounder pushed a commit that referenced this issue Sep 17, 2021
…on post-build. A developer can now show "Help" and see the `About` dialog. #182
@Pressacco
Copy link
Member Author

Solution

The simplest solution was to rollback the MaterialDesignThemes NuGet package back to version v4.0.0.

  • It appears that a change was made to the ComboBox in v4.0.1. As a result, click messages are no longer forwarded down to the TextBox when you click on the ComboBox control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug_report A documented but unresolved software problem. known_issue A documented software problem that cannot be fixed.
Projects
None yet
1 participant