Problem/Motivation

There's a scenario where upon clicking "Select entities", there's a possibility that the AJAX handler is not attached if js/entity_browser.view.js is loaded before core's views/js/ajax_view.js.

This is because the code relies on ajax_views creating a certain Javascript property before it can act on it.

Steps to reproduce

Create a simple entity browser widget with a search input, clicking the search input will not be handled via AJAX, but instead submit and cause the user to lose the current state.

Proposed resolution

Ensure that views/views.ajax is a dependency of the entity_browser/view library, ensuring that the Drupal.behaviors.ViewsAjaxView.attach() behaviour is called before entity browser's attachment behaviour.

Remaining tasks

Provide issue fork/patch.

User interface changes

N/A. AJAX requests will now work in a more consistent manner.

API changes

N/A

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

codebymikey created an issue. See original summary.

codebymikey’s picture

Status: Active » Closed (duplicate)
Related issues: +#3485010: Update CI configuration and fix JS dependencies

This appears to be have been fixed as part of #3485010: Update CI configuration and fix JS dependencies.

Closing as duplicate.