Skip to content

[5.x]: Elements are "selected" when interacting with buttons and links inside element index cards and rows #14669

@mmikkel

Description

@mmikkel

What happened?

Description

In Craft 5's element indexes, elements are selected when clicking anywhere inside their row (or card) – as opposed to having to specifically click the "Select" checkbox, in previous versions of Craft.

This is a very good feature/change! However the current implementation feels a little bit too aggressive to me, as elements are always selected, even when the user clicks on interactive items inside rows (or cards), such as structure entry move handles, or even links (like the URI globe).

As an example: after re-arranging some structure entries via the structure move handles, the user ends up with the user having "selected" multiple entries, that they probably did not actually intend to select:

CleanShot.2024-03-23.at.23.21.47.mp4

In my opinion, this feels like unintended/unwanted behaviour: if the user clicks on an interactive node (i.e. button or link) inside an element index row or card, their intent is most likely not to "select" that element, but to achieve whatever action the interactive element they clicked provides. As such, I think it'd make sense to prevent elements from being selected when the user interacts with a button or link inside element index rows or cards.

Steps to reproduce

Expected behavior

Actual behavior

Craft CMS version

5.0.0-beta.11

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

None

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions