Skip to content

[5.x]: Deselecting elements in element indexes is sluggish #14896

@mmikkel

Description

@mmikkel

What happened?

Description

It feels like there's some kind of minor UI performance issue when deselecting elements in Craft 5's element indexes (and element select modals).

I don't know if it's possible to tell from the screencast below, but in reality there's a very noticeable and consistent ~>0.5s delay from clicking a selected element, to the element actually appearing as deselected/selectable:

CleanShot.2024-04-29.at.21.42.54.mp4

Selecting elements is instant, and the UI in general feels very performant, which makes the slower deselect action all the more noticeable.

I tested this on a few different browsers (including the latest Chrome and Edge) on a couple of different Macs (including an M1) and FWIW the behavior and performance seems pretty much the same everywhere.

Obviously this isn't the biggest problem in the world. Deselecting elements is a very common action though, so it'd be nice if it felt as spiffy as everything else 😊

Steps to reproduce

  1. Select an element in an element index or select modal
  2. De-select the element

Expected behavior

Deselecting elements should be instant.

Actual behavior

The action of deselecting elements is noticeably slower than selecting elements, giving the impression that there's some kind of JS performance issue under the hood.

Craft CMS version

5.0.5

PHP version

No response

Operating system and version

macOS 14.3.1, Edge 124.0.2478.67

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions