maui icon indicating copy to clipboard operation
maui copied to clipboard

[iOS] Implement IsEnabled property on Editor

Open jsuarezruiz opened this issue 3 years ago • 3 comments

Description of Change

Implement IsEnabled property on iOS Editor.

Issues Fixed

Fixes #6700

jsuarezruiz avatar May 30 '22 14:05 jsuarezruiz

Why is this an iOS specific? I am wondering if we should rather update the extension method to check this type to not only remove the API break but also because it will be surprising. What if the extension is being called from the base UIView?

mattleibow avatar Jun 02 '22 08:06 mattleibow

What if the extension is being called from the base UIView?

Actually, I have the same doubt, is the MAUI control ContentView.Enabled property working on iOS?

SotoiGhost avatar Jul 19 '22 21:07 SotoiGhost

Why is this an iOS specific? I am wondering if we should rather update the extension method to check this type to not only remove the API break but also because it will be surprising. What if the extension is being called from the base UIView?

On all platforms we manage the IsEnabled property at the ViewHandler level in the MapIsEnabled method, then on each platform managed by the UpdateIsEnabled method of ViewExtensions.

However, in this specific case in Xamarin.Forms it was managed in the Renderer with some workaround https://github.com/xamarin/Xamarin.Forms/blob/5.0.0/Xamarin.Forms.Platform.Android/Renderers/EditorRenderer.cs#L59 In .NET MAUI we manage it at the Handler level to modify the Editable and Selectable properties of the UITextView. The extension method expects a control of type UITextView not UIView.

jsuarezruiz avatar Sep 15 '22 09:09 jsuarezruiz