Completed
Last Updated: 10 Feb 2022 09:28 by ADMIN
Release 2020.3.1207 (R3 2020 minor release)
Brad
Created on: 09 Jun 2020 11:21
Category: AutoCompleteView
Type: Bug Report
2
AutoCompleteView: [UWP] Entry steals focus from everything and cannot click buttons to navigate

Use the following code:

<StackLayout Orientation="Vertical">
    <telerikInput:RadAutoCompleteView ItemsSource="{Binding Source}"
                                        SuggestMode="SuggestAppend" 
                                        TextSearchPath="Name" />
    <telerikInput:RadAutoCompleteView ItemsSource="{Binding Source}"
                                        SuggestMode="SuggestAppend"
                                        TextSearchPath="Name"/>
    <telerikInput:RadAutoCompleteView ItemsSource="{Binding Source}"
                                        SuggestMode="SuggestAppend"
                                        TextSearchPath="Name"/>
</StackLayout>

Steps to reproduce: 

On the first control, enter a value not in the list.
Click in the control to accept the value.
On the second control, enter a value not in the list
Hit the Tab key on the keyboard.
Click on the first control again
Focus bounces around. You must restart the app to fix the issue.

 

 

8 comments
ADMIN
Didi
Posted on: 10 Feb 2022 09:28

Hi Michael,

Yes, I have reproduced the behavior with the ScrollView and input control. The issue you observe occurs because of the ScrollView and in a combination with shell navigation. The initial issue reported in this public item is not related to the behavior you have described. 

Solution:

I have added the invisible button in the first layout where the input control is defined:

<telerikPrimitives:RadSideDrawer.MainContent>
    <ScrollView Margin="0,30,0,0">
        <StackLayout Spacing="5" Padding="10,0,10,0">
            <Button HeightRequest="0" WidthRequest="1" />
            <telerikPrimitives:RadAccordion x:Name="accordian" Spacing="5" />
            <Button Text="Add Violation  +" HorizontalOptions="FillAndExpand" Margin="10,5" BorderWidth="0.3"
                        Clicked="Button_Clicked" />
        </StackLayout>
    </ScrollView>
</telerikPrimitives:RadSideDrawer.MainContent>
Also I kept the ScrollView renderer. The issue cannot be reproduced. Find the modified project attached. 

I hope this will be of help. If you have any additional questions or comments, please open a support ticket.

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Attached Files:
Michael
Posted on: 08 Feb 2022 14:52
Hi Didi, that solution does not work for me because if you scroll the top of the view of the screen and select a non- focusable element, the scroll view automatically scrolls the view back to the top, which moves and hides the control you are attempting to select, this the reason for custom renderer. Also, in the scenario where I am using the custom scroll view renderer, I only get a problem if I add your auto complete view control as the first element on the view. I have other pages that have a few controls on them that I use the scroll view and they work just fine. This is why I look at it as an issue of the auto complete view control. Hope this explains where I am coming from. 
Thanks,
Michael.
ADMIN
Didi
Posted on: 08 Feb 2022 06:40

Hi Michael,

The issue you have with the ScrollView is not related to the Telerik UI for Xamarin Input controls. The behavior observes also in the Xamarin.Forms entry. The issue is logged in the Xamarin.Forms GitHub repo: https://github.com/xamarin/Xamarin.Forms/issues/10420 

Let me explain in details about this issue: You have an input control which receives focus when it is inside ScrollView. In your case the first editable control is the AutoCompleteView. If you add a Entry control first, and then focus the AutoCompleteView then open and close the SuggestionView, the entry control will be focused and the behavior with the AutoCompleteView will disappear.

Solution:
Instead of using renderers for the ScrollView, try to add an invisible button inside the first layout where the input control is defined. Here is the solution suggested: https://stackoverflow.com/questions/42231163/is-it-possible-to-stop-the-first-entry-getting-focus-in-a-scrollview-in-xamarin/42245601  

Example how to define an invisible button: 

    <Button HeightRequest="0" WidthRequest="1" />
If you have any additional questions on this, please open a support ticket. In this way we can research the case separately from the initial issue reported in this public feedback item. This feedback item is closed and the issue related to it is fixed. The current behavior you have is different and the issue is related to Xamarin.Forms ScrollView control. 

 

Regards,
Didi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Michael
Posted on: 07 Feb 2022 18:38

Hi, I found I am getting this issue if I have an autocomplete view control as the first focusable element in a scroll view while using an open source scroll view renderer. The custom renderer stops the UWP scroll view from attempting to set focus to the first focusable element when you click on any control which does not accept focus. When I disable this renderer I get a completely different problem. In this case when you click on any control which does not accept focus, focus is set to the autocomplete view(since it is the first focusable element) and worse if there is entry in it, it will automatically display the suggestions view. The suggestion view gets displayed even when the control is not visible, for example if is in a collapsed accordion item.

I am attaching a test solution that demos these two scenarios. To test the second scenario, simply remark out the renderer attribute.

Scenario 1:

Run app, Select Violations Tab, select an item in the autocomplete view(first control on view), click on any non-focusable control like a label and then try changing a tab.

 

Scenario 2:

Disable custom renderer, Run app, Select Violations Tab, select an item in the autocomplete view(first control on view), scroll the view and then click on any non-focusable control like a label. You can also add new accordion item(Add Violation button) to see suggestion view even if it is on the collapsed accordion item.

 

Hope this helps.

Attached Files:
ADMIN
Didi
Posted on: 04 Feb 2022 14:26

Hi Michael,

Please send us a sample repro project with the exact implementation you have, so we can research the case further. If you do not want to share the project in the public portal, open a support ticket and attach it there. 

Thank you for the understanding.

Regards,
Didi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Michael
Posted on: 04 Feb 2022 14:22
Hi, I have version 2021.2.728.1 (Jul 28, 2021) and I am having this problem. 
ADMIN
Didi
Posted on: 04 Feb 2022 06:23

Hi Michael,

Based on the public item status - It is completed and the fix is included in the Telerik UI for Xamarin version 2020.3.1207. This version and all versions above include the fix. 

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Michael
Posted on: 03 Feb 2022 20:53
Hi, has this issue ever been fixed? If not, is there a plan to fix it?