Customers find navigating the media browser a little challenging. One of the annoyances they report is for single-value fields having to select an image and then scroll to the bottom of the browser to submit it. They'd prefer to simply double-click media assets to select and submit them in one step.

It looks like this was intended to be added as part of #2815809: [Entity Browser Enhanced] to provide some behaviours and style enhancements to Entity Browsers, specifically for multiselect and image/media browsers. or #2829444: Multiselect media fields cannot select more than 1 item. but it slipped through the cracks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dane Powell created an issue. See original summary.

Dane Powell’s picture

Status: Active » Needs review
FileSize
1.26 KB

This might be more of a proof of concept, but it works in our case.

balsama’s picture

I don't think double-click for single items was ever in our plan, but it makes sense... and has a POC patch, so I put it into our 2.1.6 plan. Thanks!

Dane Powell’s picture

FileSize
1.2 KB
1.55 KB

Somewhat more generic version of this patch

phenaproxima’s picture

Component: Code » Media
Issue tags: +Needs manual testing
FileSize
887 bytes

This oughta do the trick. Rather than bother with awkward jQuery selectors, I just changed the Backbone view that powers the entity browser ;-) I did a bit of manual testing and it worked beautifully. If this works for you, mark it RTBC and we'll merge it.

Dane Powell’s picture

Status: Needs review » Reviewed & tested by the community

Works great, thanks!

  • balsama committed cef319b on 8.x-2.x authored by phenaproxima
    Issue #2888535 by Dane Powell, phenaproxima: Double-click to select...
balsama’s picture

Status: Reviewed & tested by the community » Fixed

Thanks! Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.