Skip to content

[iOS] Fix for Editor scaling creating new lines on older iOS versions#25691

Merged
rmarinho merged 8 commits into
dotnet:mainfrom
Tamilarasan-Paranthaman:fix-25581
Dec 10, 2024
Merged

[iOS] Fix for Editor scaling creating new lines on older iOS versions#25691
rmarinho merged 8 commits into
dotnet:mainfrom
Tamilarasan-Paranthaman:fix-25581

Conversation

@Tamilarasan-Paranthaman

Copy link
Copy Markdown
Member

Root Cause of the issue

  • The layout of the Editor behaves differently on iOS 17.5 and earlier versions when the scale changes at runtime. Specifically, the content height gradually increases when scaling down the Editor, suggesting improper handling of height.

Description of Change

  • It seems that iOS 18.0 handles this behavior correctly. To ensure consistent behavior similar to iOS 18.0, I wrapped the Editor in a container for iOS 17.5 and earlier versions. This container ensures that the layout remains stable and visually consistent, even when the Editor is scaled or resized. Since the issue is resolved in iOS 18.0 and later, the additional container is not needed for those versions.

Issues Fixed

Fixes #25581

Tested the behaviour in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Screenshot

Before Issue Fix After Issue Fix
Issue.mov
Fix.mov

@dotnet-policy-service dotnet-policy-service Bot added the community ✨ Community Contribution label Nov 5, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Hey there @Tamilarasan-Paranthaman! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@PureWeen

PureWeen commented Nov 5, 2024

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

Comment thread src/Core/src/Handlers/Editor/EditorHandler.iOS.cs
@PureWeen PureWeen added this to the .NET 9 SR2 milestone Nov 7, 2024
@jsuarezruiz

Copy link
Copy Markdown
Contributor

/rebase

@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Test failing on winui

@Tamilarasan-Paranthaman

Copy link
Copy Markdown
Member Author

Test failing on winui

@PureWeen, I have added the snapshot for WinUI.

@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz jsuarezruiz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The device tests:

ScrollEditor
Assert.True() Failure\nExpected: True\nActual:   False

and

ScrollNextEditor
Assert.True() Failure\nExpected: True\nActual:   False

are failing after the changes.

@Tamilarasan-Paranthaman

Copy link
Copy Markdown
Member Author

The device tests:

ScrollEditor
Assert.True() Failure\nExpected: True\nActual:   False

and

ScrollNextEditor
Assert.True() Failure\nExpected: True\nActual:   False

are failing after the changes.

@jsuarezruiz, I have fixed this by restricting the Mac platform in the fix, as the issue occurred on the iOS platform. The cases have passed locally. Could you please check and let me know if you have any concerns?

Screenshot

@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@tj-devel709

Copy link
Copy Markdown
Member

@Tamilarasan-Paranthaman did you see this issue in iOS 17? I have only noticed it in 15.5 and 16.4 but maybe there is a scenario it happens in 17 also?

@Tamilarasan-Paranthaman

Copy link
Copy Markdown
Member Author

@Tamilarasan-Paranthaman did you see this issue in iOS 17? I have only noticed it in 15.5 and 16.4 but maybe there is a scenario it happens in 17 also?

@tj-devel709, I encountered this issue in iOS 17+ as well. Interestingly, I am currently unable to reproduce it in iOS 17+ (specifically tested on version 17.5). This is quite unusual, as the issue report also confirms it was verified in version 17.5. Could you please share your thoughts on this and suggest how we should proceed?

@PureWeen

PureWeen commented Dec 5, 2024

Copy link
Copy Markdown
Member

@Tamilarasan-Paranthaman let's just go with what you're seeing

Can you just set the operating system version check to whatever version you find that we need this for?

@Tamilarasan-Paranthaman

Copy link
Copy Markdown
Member Author

@Tamilarasan-Paranthaman let's just go with what you're seeing

Can you just set the operating system version check to whatever version you find that we need this for?

@PureWeen, I have updated the version, and it will now apply only to versions below 17. Could you please check it now and let me know if you have any further concerns?

@sheiksyedm sheiksyedm added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Dec 6, 2024
@PureWeen

PureWeen commented Dec 6, 2024

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen modified the milestones: .NET 9 SR2, .NET 9 SR3 Dec 6, 2024

@tj-devel709 tj-devel709 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Confirmed with these new changes that it works with the following I versions!

18.1
18.0
17.5
17.2
17.01
16.4
15.5

@PureWeen PureWeen dismissed jsuarezruiz’s stale review December 9, 2024 16:56

issues addressed

@rmarinho rmarinho merged commit 6ea4db1 into dotnet:main Dec 10, 2024
@samhouts samhouts added the fixed-in-net9.0-nightly This may be available in a nightly release! label Dec 16, 2024
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 17, 2025
@Tamilarasan-Paranthaman Tamilarasan-Paranthaman deleted the fix-25581 branch June 16, 2025 11:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-editor Editor community ✨ Community Contribution fixed-in-net9.0-nightly This may be available in a nightly release! partner/syncfusion Issues / PR's with Syncfusion collaboration platform/ios

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Editor Scaling creating new lines on older iOS versions

7 participants