Skip to content

Conversation

SISTF
Copy link
Contributor

@SISTF SISTF commented Aug 3, 2025

When typing in the embedded search TextBox, pressing Spacebar was bubbling up to the TableView,

causing unintended row selection or scrolling.

This fix:

  • marks the Space key event as handled when focus is in the search box
  • manually inserts a space character into the TextBox at the caret
  • prevents TableView from reacting to Space input during search

Fixes #169

…bling up to the TableView,

causing unintended row selection or scrolling.

This fix:
- marks the Space key event as handled when focus is in the search box
- manually inserts a space character into the TextBox at the caret
- prevents TableView from reacting to Space input during search

Fixes w-ahmad#169
Copy link
Owner

@w-ahmad w-ahmad left a comment

Choose a reason for hiding this comment

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

The issue why this happen is because the search box and the filter list is within the template of a menu item which is using space button to invoke it. the correct solution is to replace the menu bar flyout with a standard flyout and then add options in it. Of course, it will take some time to match the UI/UX to the existing flyout.

@SISTF
Copy link
Contributor Author

SISTF commented Aug 5, 2025

Hi @w-ahmad,

Thanks for your feedback and for maintaining this great project!

I understand your point about the root cause being the use of a flyout-menu item template for the filter, which causes the spacebar to trigger the menu’s default behavior. However, since the issue only occurs when the search box is focused, handling the spacebar event in the TextBox itself shouldn’t interfere with the standard flyout/menu behavior for other controls. Esc still closes the flyout, Enter still applies the filter, and the workaround only affects the search box, so it feels like a safe and practical fix for now that provides standard possibility to enter text in a searchbox.

I agree with your suggestion that, in the long run, the filter/options menu should be reworked to use a popup instead of a flyout. This would allow for a more advanced and resizable UI, similar to Excel, and would make it easier to display and interact with larger filter lists or more complex content.

For now, I think it makes sense to merge this workaround to improve usability, and I’ll open a separate issue #198 to track the proposal for a more robust, popup-based filter/options dialog in the future.

Thanks again for your consideration!

@w-ahmad
Copy link
Owner

w-ahmad commented Aug 13, 2025

Thank you @SISTF for your contribution. I'm planning to fix this issue in v1.4, hopefully later this year so we have plenty of time to rewrite the XAML of the flyout or to implement the popup that you suggested in related issue. I would say that let's park this PR for now and if I couldn't be able to do it we can merge this PR to at least resolve the issue.

@lostluna1
Copy link

感谢您的贡献。我计划在 v1.4 中修复此问题,希望今年晚些时候,这样我们就有足够的时间重写浮出控件的 XAML 或实现您在相关问题中建议的弹出窗口。我想说的是,让我们暂时停放这个 PR,如果我做不到,我们可以合并这个 PR 至少解决问题。

Hi, are you thinking of fixing all IME input methods like not being able to type Chinese/Japanese via IM method in filter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autofilter closes if you enter the "Space" character in the search.
3 participants