Unplanned
Last Updated: 04 Nov 2022 06:02 by Neil
Patrik Madliak
Created on: 24 Aug 2022 10:57
Category: MultiSelect
Type: Bug Report
1
Focused item state is incorrectly retained in Firefox

Description

In Firefox, there are occasions in which multiple items remain focused (k-focus class is not removed from the blurred item)

Reproduction (if bug)

  1. Create a multiselect and set AutoClose="false".
  2. Open the component and select a few items.
  3. Close the component.
  4. Open the component and select a new item.
  5. Two items have the k-focus class.

Second related case:

  1. Create a multiselect and set AutoClose="false".
  2. Open the component and navigate up and down with the keyboard arrows.
  3. Select an item.
  4. The last focused item with the arrows is focused as well as the newly selected item.

REPL for reproduction

Expected (if bug)

Only one item should have the k-focus class at a time.

Browser (if bug)

Firefox

Broken Telerik UI for Blazor version (if bug)

3.5.0

2 comments
Neil
Posted on: 04 Nov 2022 06:02

If this helps anyone:

The issue in Firefox seems to be that the k-focus class is added to the parent div surrounding the Telerik Control so trying to remove by calling the element id does not work you have to remove it from the parent

 

I added a JS function to the _layoutHTML page which is called via interop

 

<script>
    function removeClass(_element, _class) {
        var el = document.getElementById(_element);
            el.removeAttribute(_class);
        var parent = el.parentNode;
  
        parent.classList.remove(_class);

        console.log("removeClass called>"+_element+" >"+_class);
    }
</script>

 

Neil
Posted on: 04 Nov 2022 05:29
I also see this behavior in Firefox when using multiple TelerikComboBox controls