Skip to content

[iOS] Shell Page gets moved partially outside of viewport when focusing element on page load #33547

@iEWngKvR67

Description

@iEWngKvR67

Description

When using a Shell and navigating to a page which has logic to focus an entry on loaded, the page gets moved partially outside the viewport. This only happens on iOS and when the pages is on the Navigation Stack.
Image

When using the same pages with a NavigationPage everything works as expected.

Steps to Reproduce

  1. Create new empty MAUI project.
  2. Add a new ContentPage which has an entry. Add a handler to the Page.Loaded event which calls Focus method on the Entry.
  3. Add a button to the MainPage which pushes the new Page on the NavigationStack when pressed.
  4. Start the app, press the button on the MainPage and leave the entry on the new page.

Expected outcome:
The Page is shown correctly.
Image

Actual outcome:
The Page gets moved parially outside the viewport.
Image

Link to public reproduction project repository

https://github.com/iEWngKvR67/MauiShellIssue

Version with bug

10.0.20

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 18.5, iOS 26.2

Did you find any workaround?

Yes, it is possible to delay the focusing of the entry.

Loaded += (_, _) => {
  Dispatcher.DispatchDelayed(TimeSpan.FromSeconds(1), () => {
    TestEntry.Focus();
  });
}

Relevant log output

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
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions