Skip to content

ScrollView content offset shifts unexpectedly when FlowDirection is set to RightToLeft [iOS/MacCatalyst] #29458

@ShyamSundar-SF4699

Description

@ShyamSundar-SF4699

Description

When a Grid contains a ScrollView with a HorizontalStackLayout inside, and the FlowDirection of the Grid is set to RightToLeft, the content inside the ScrollView gets shifted unexpectedly. The ScrollView itself has FlowDirection set to MatchParent. This causes the content offset to change automatically, which leads to the horizontal content appearing scrolled to the end or misaligned when switching to RTL.

Sample: CustomSample.zip

Video: https://github.com/user-attachments/assets/c139c117-50d8-4590-a590-d11edc277ef2

Steps to Reproduce

  1. Run the sample mentioned in the description.
  2. Change the FlowDirection to RTL.
  3. An offset appears in the ScrollView where no items are present.

Expected Result:

  • Should be able to scroll through all items inside the HorizontalStackLayout within the ScrollView.

Actual Result:

  • Offest makes some of the items in the HorizontalStackLayout away from the view.

Link to public reproduction project repository

No response

Version with bug

9.0.60 SR6

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

9.0.22 SR2.2

Affected platforms

iOS, macOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-scrollviewScrollViewi/regressionThis issue described a confirmed regression on a currently supported versionplatform/iosplatform/macosmacOS / Mac Catalystregressed-in-9.0.30s/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

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions