Skip to content

[5.x]: Asset filename tooltip overlaps the "Add an asset" button in asset fieldsΒ #14836

@mmikkel

Description

@mmikkel

What happened?

Description

This is a relatively minor UI annoyance 😊 but – from working with Craft 5 for a little while, I find that it's easy to accidentally trigger the filename tooltip in asset field thumbs when attempting to click the "Add" button, if the mouse pointer is moved downwards and happens to move over the truncated filename for the first thumbnail in the field, en route to the button.

If the user is a fast clicker, it's easy to end up on the dedicated asset edit page when attempting to click the "Add" button, as the tooltip overlaps the "Add" button and extends the clickable area for the filename link. And if the user manages to avoid that, it's still a bit of a struggle to make the tooltip disappear, in order to actually be able to click the "Add" button below it.

Some potential solves:

  • Force the filename tooltip to always appear above the filename, not below it.
  • Add pointer-events: none to the tooltip to avoid it catching the click event if/when it's obscuring the "Add an asset" button
  • Add a tiny delay before the tooltip appears on filename mouseenter
CleanShot.2024-04-19.at.23.29.17.mp4

Steps to reproduce

  1. Create an assets field, and select "Large Thumbnails" for the View Mode setting
  2. Add the assets field to a field layout, and add a file to it
  3. Move mouse downwards towards the "Add an asset" button

Expected behavior

Not having to fight a tooltip when attempting to add an asset.

Actual behavior

The tooltip is looking for a fight.

Craft CMS version

5.0.4

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions