Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] Readonly Editor - Scrolling fix #20505

Merged
merged 17 commits into from
Aug 24, 2024

Conversation

kubaflo
Copy link
Contributor

@kubaflo kubaflo commented Feb 11, 2024

Description of Change

Setting UserinteractionEnabled to false prevents the editor from scrolling, so I replaced it with changing the value of Editable based on the IsReadOnly property

Issues Fixed

Fixes #19500

Screen.Recording.2024-02-11.at.14.41.57.mov

@kubaflo kubaflo requested a review from a team as a code owner February 11, 2024 14:00
@ghost ghost added the community ✨ Community Contribution label Feb 11, 2024
@ghost
Copy link

ghost commented Feb 11, 2024

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

@kubaflo kubaflo changed the title Ios readonly editor scroll fix [iOS] Readonly Editor - Scrolling fix Feb 11, 2024
Copy link
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

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

The IsReadOnlyInitializesCorrectly test is failing on iOS and Catalyst.
image
Could you take a look?

@Eilon Eilon added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Feb 21, 2024
@kubaflo
Copy link
Contributor Author

kubaflo commented Feb 22, 2024

@jsuarezruiz I added a new commit

@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@Eilon Eilon removed the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 10, 2024
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

mattleibow
mattleibow previously approved these changes Aug 21, 2024
if (view is ITextInput textInput)
// Interaction should not be disabled for an editor if it is set as read-only
// because this prevents users from scrolling the content inside an editor.
if (view is not IEditor && view is ITextInput textInput)
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if this is all wrong for IEntry too and we should be using the https://learn.microsoft.com/en-us/dotnet/api/uikit.uitextfielddelegate.shouldbeginediting?view=xamarin-ios-sdk-12

But this will still apply for the search bar. So we can do this (investigate at least) later.

# Conflicts:
#	src/Controls/tests/TestCases.HostApp/Issues/Issue19500.xaml
#	src/Controls/tests/TestCases.HostApp/Issues/Issue19500.xaml.cs
@mattleibow
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

mattleibow
mattleibow previously approved these changes Aug 21, 2024
@mattleibow
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@mattleibow
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@mattleibow
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@mattleibow mattleibow merged commit c156658 into dotnet:main Aug 24, 2024
97 checks passed
@samhouts samhouts added the fixed-in-net8.0-nightly This may be available in a nightly release! label Aug 27, 2024
@samhouts samhouts added the fixed-in-net9.0-nightly This may be available in a nightly release! label Sep 5, 2024
@samhouts samhouts added fixed-in-9.0.0-rc.2.24503.2 and removed fixed-in-net9.0-nightly This may be available in a nightly release! fixed-in-net8.0-nightly This may be available in a nightly release! labels Oct 14, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Nov 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

On ios, if IsReadOnly is true, the Editor will not be able to scroll
5 participants