-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Android Editor - Text selection menu does not appear when selecting text on an editor placed within a ScrollView #8291
Comments
@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. |
@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?
|
I'm facing this issue also..... Is there a work around for this? |
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 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 PR Incoming In the mean time you can use a custom renderer and copy the code below which should resolve for you 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 |
Description
Cannot get text selection menu to show in Android editor if the editor lives in the following hierarcy:
TabbedPage
---ScrollView
------Editor
Steps to Reproduce
Expected Behavior
Show text selection menu when selecting a text on editor.
Actual Behavior
No text selection menu shown when selecting a text on editor inside a ScrollView, which lives inside a TabbedPage
Basic Information
Screenshots
The text was updated successfully, but these errors were encountered: