Skip to content

[ios] presence of a semantics action affects platform view positioning #150030

Description

@yjbanov

Adding a SemanticsAction to an ancestor node of an iOS platform view can cause the platform view to be incorrectly positioned.

To reproduce:

  • Basics
    • Setup your local environment for iOS development (e.g. install Xcode)
    • cd dev/integration_tests/ios_platform_view_tests
    • open ios/Runner.xcworkspace in Xcode
    • Open PlatformViewUITests
  • Passing configuration:
    • Run the test as is
    • Witness the test passing
  • On this line wrap UiKitView in a Semantics widget adding it any non-scrolling action (adjusting const as needed), say, onIncrease, like so:
            child: Semantics(
              onIncrease: () {},
              child: UiKitView(viewType: 'platform_text_field'),
            ),
  • Rerun the test in Xcode
  • Witness the test failing on this line with the following error:
Failed to failed to scroll to visible (by AX action) TextField, {{46.5, 115.0}, {300.0, 50.0}}, identifier: 'platform_view[0]', value: Platform Text Field, error: Error kAXErrorCannotComplete performing AXAction kAXScrollToVisibleAction on element AX element pid: 88534, elementOrHash.elementID: 4546916864.36. (Underlying Error: Error kAXErrorCannotComplete performing AXAction kAXScrollToVisibleAction on element AX element pid: 88534, elementOrHash.elementID: 4546916864.36)

Breadcrumbs:

Expected behavior

Simply adding an action to an ancestor of a platform view should not alter the platform view's position on the screen.

Activity

  1. added
    P2Important issues not at the top of the work list
    triaged-iosTriaged by iOS platform team
    on Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listplatform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions