I believe this issue is limited to Internet Explorer (IE11). I haven't experienced this in other tested browsers Chrome/FF.

Repeatable: Always
Steps to repeat:
1. Set up Dependent Fields as described in this article: https://www.drupal.org/docs/8/modules/business-rules/advanced-usage/depe.... In my case, my parent and dependent fields are on the User account at /admin/config/people/accounts/fields.
3. Add a user at /admin/people/create, and select a value for the parent field.

Expected Results:
Dependent fields display dropdown/select options based on the parent field value.

Actual Results:
In Internet Explorer only, dropdown/selects are blank, with no options available to select. There are no errors in the browser, Watchdog, or Apache.

The site I'm building is for an organization that uses IE exclusively. Wondering if anyone else has experienced this issue or has any thoughts or direction for further troubleshooting.

Comments

kdomenick created an issue. See original summary.

kdomenick’s picture

We were able to find a workaround for this, and I wanted to share. From researching, this issue is a Javascript issues with how IE handles event creation. So, this line of code does not work in versions of IE, but does work in most other browsers:

var event = new Event('change');

In the file business_rules/js/update-options-command.js, I replaced that one line of code with this block:

if(typeof(Event) === 'function') {
  var event = new Event('change');
}else{
  var event = document.createEvent('Event');
  event.initEvent('change', true, true);
} 

Tested in IE 11, and dropdowns are now functioning as expected.

_andrew’s picture

StatusFileSize
new493 bytes

I can confirm that with the current version of business_rules (8.x-1.0-beta7) we have this same issue with IE11 (the module is essentially broken with that browser). This JS change cleanly applies via a patch (attached to this comment).

_andrew’s picture

I can confirm that with the current version of business_rules (8.x-1.0-beta7) we have this same issue with IE11 (the module is essentially broken with that browser). This JS change cleanly applies via a patch (attached to this comment).

colan’s picture

Component: User interface » Dependent fields
chertzog’s picture

StatusFileSize
new531 bytes

Reroll of patch on 2.x for beta1