Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset uploaded via asset modal are not selected if file name is not visible #2812

Closed
jsunsawyer opened this issue Apr 26, 2018 · 1 comment
Closed
Assignees
Labels
assets 📁 features related to asset management bug severity:minor Cosmetic issues or bugs with simple workarounds

Comments

@jsunsawyer
Copy link

jsunsawyer commented Apr 26, 2018

Description

Assets uploaded via the asset modal aren't selected if their file name would be positioned in a way that it would need to be scrolled to. The uploaded asset should always be selected, regardless of the users' sort order.

Steps to reproduce

[Requires that enough assets exist in a volume to require scrolling in the asset modal.]

  1. Click Add Image on an asset field.
  2. Sort assets by File Modified Date (oldest first – to replicate issue).
  3. Upload an image.

Additional info

  • Craft version: 3.0.4
@brandonkelly brandonkelly added bug severity:minor Cosmetic issues or bugs with simple workarounds assets 📁 features related to asset management labels Apr 26, 2018
@brandonkelly
Copy link
Member

@andris-sevcenko I think to fix this, when a new file is uploaded, we should automatically change the index to be sorted by Date Uploaded - Descending, so that we can be sure that the newly-uploaded asset will be selected.

If that means that previously-selected assets might lose their selection if they go out of view, so be it; preference should be given to the newly-uploaded asset(s).

angrybrad pushed a commit that referenced this issue Jul 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assets 📁 features related to asset management bug severity:minor Cosmetic issues or bugs with simple workarounds
Projects
None yet
Development

No branches or pull requests

3 participants