Skip to content

The .net maui title bar disappears and does not re-appear on iOS when using shell.searchhandler #14448

@Kurt427

Description

@Kurt427

Description

Please see the Microsoft Q&A question I submitted: Why does the .net maui title bar disappear on iOS when using shell.searchhandler?.

Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) suggested that I should report this issue.

Steps to Reproduce

  1. Choose the "About" page using the flyout menu. The title bar with the menu icon and the "About" title is visible.
  2. Tap into the search field. The title bar disappears.
  3. Type any text into the search field and tap "Search" in the virtual keyboard.
  4. An alert box appears with message "AboutSearchHandler.OnQueryConfirmed(): Query: '' IsFocused: 'False'".

So, the query was completed and focus left the search field. However, the title bar is not restored.

NOTE: The code was changed slightly from the version submitted as the Microsoft Q & A question:

  1. The alert box in OnQueryConfirmed() appears with message that now shows the state of IsFocused. (Also, for simplicity, the custom ShellUtils static class is not included.)
  2. The OnFocused() and OnUnfocus() overrides were added to AboutSearchHandler to confirm that in fact OnUnfocus() is getting called when/after OnQueryConfirmed() is called.

I would have preferred to use the search suggestions feature of Shell.SearchHandler. However, as stated in the comments in AboutSearchHandler.OnQueryChanged, enabling that feature on iOS, at least for me causes .NET Maui to crash. Regardless, it should be possible to use Shell.SearchHandler without search suggestions since there is a "ShowsResults" option.

Link to public reproduction project repository

https://github.com/Kurt427/ShellSearchTest

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

Tested on iPhone 11 Pro iOS v15.6.1, and also on iPhone 14 iOS 16.2 simulator.

Did you find any workaround?

No.

Relevant log output

When using iPhone 14 iOS 16.2 simulator, when clicking into search field (not sure if relevant):

2023-04-06 10:00:54.792016-0700 ShellSearchTest[8294:73792] [unspecified] container_query_get_single_result: error = 2→(98) NOT_CODESIGNED
2023-04-06 10:00:54.792312-0700 ShellSearchTest[8294:73792] [unspecified] container_system_group_path_for_identifier: error = ((container_error_t)98) NOT_CODESIGNED
2023-04-06 10:00:54.792608-0700 ShellSearchTest[8294:73792] [MC] Error getting system group container for systemgroup.com.apple.configurationprofiles: 98
2023-04-06 10:00:54.793083-0700 ShellSearchTest[8294:73792] [MC] Failed to get profile system group container path. Overriding with expected path: /Users/kurt/Library/Developer/CoreSimulator/Devices/C72FA5AC-12C8-4F22-98BB-606EDCF98930/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2023-04-06 10:00:54.892664-0700 ShellSearchTest[8294:73792] [SceneConfiguration] Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-shellShell Navigation, Routes, Tabs, Flyoutarea-navigationNavigationPagepartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/ioss/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions