Cannot get text selection menu to show in Android editor if the editor lives in the following hierarcy:
TabbedPage
---ScrollView
------Editor
Show text selection menu when selecting a text on editor.
No text selection menu shown when selecting a text on editor inside a ScrollView, which lives inside a TabbedPage
@SachinCS1992 I'm trying to reproduce this issue, but so far I'm not having any luck. In the attached project, I have an Editor inside of a ScrollView, and long press works just fine to select text and pull up the cut/copy/paste menu. Is there some detail I'm missing?
@hartez I just tried your repro and compared it against my use case - just noticed that the ScrollView actually needs to be inside a TabbedPage for the issue to occur. I've updated the description above, and also your repro project to replicate the issue and re-uploaded it for your perusal, thanks.
_8291.Repro_modified.zip
@hartez have you had a chance to review updated repro steps from above?
Yep, that updated repro definitely demonstrates this issue.
Also ... that's weird.
Any updates on this? It's causing a lot of frustration and headache for thousands of our customers. Also haven't been able to find a workaround without removing them from under a tabbed page or a scrollview, but it's not feasible in the context/use-case of our applications.
Any updates would be appreciated, thanks.
I'd like to see this fixed too. In my case, the editor parents up to a ContentPage. If I remove the ScrollView in the middle, the issue goes away.
Does it have to do with the fact that the application is listening to 2 types of swipes now and it is blocking the selection gesture as a possible swipe? Vertical swipes for the ScrollView, Horizontal for the Tab switching? Try disabling swipe tab switching and see what happens.
There is no horizontal scrolling or swiping in my case.
No horizontal scroll/swipe in my case either. I think it's the PR I've linked to in the above description is what introduced this issue.
same issue here. Any plan to fix?
I'm using version 4.3.0.908675 of Xamarin Forms Android. After adding scrollview, the copy-paste inside editor stops working. Does anyone have a workaround for this issue?
Example:
<ContentPage.Content>
<ScrollView>
<StackLayout>
<Editor HeightRequest="100"></Editor>
</StackLayout>
</ScrollView>
</ContentPage.Content>
I'm facing this issue also..... Is there a work around for this?
Like a custom renderer or something
Anyone interested in fixing the bug?
Seems like the bug should be fixed in this file : https://github.com/xamarin/Xamarin.Forms/blob/bd31e1e9fc8b2f9ad94cc99e0c7ab058174821f3/Xamarin.Forms.Platform.Android/Renderers/ConditionalFocusLayout.cs or here https://github.com/xamarin/Xamarin.Forms/blob/bd31e1e9fc8b2f9ad94cc99e0c7ab058174821f3/Xamarin.Forms.Platform.Android/Renderers/ScrollViewRenderer.cs
There was no changes made there since 2017/2018 so it seems to be an old bug that you just caught. I would just build the project locally and try to see if it hits the Touch breakpoints in those files.
Also, there were changes made in other files related to the Editor / ScrollView, but none of them seemed to cause this issue.
It looks like this is a bug on the google side
https://issuetracker.google.com/issues/37095917
I added this to our EditorRenderer and it starts to work after that
PR Incoming
In the mean time you can use a custom renderer and copy the code below which should resolve for you
```C#
protected override void OnAttachedToWindow()
{
base.OnAttachedToWindow();
EditText.Enabled = false;
EditText.Enabled = true;
}
```
Here's a link to the nuget if anyone would like to test this out
Most helpful comment
It looks like this is a bug on the google side
https://issuetracker.google.com/issues/37095917
I added this to our EditorRenderer and it starts to work after that
PR Incoming
In the mean time you can use a custom renderer and copy the code below which should resolve for you
```C#
protected override void OnAttachedToWindow()
{
base.OnAttachedToWindow();
```