[Solved] Blaze crash in IE11 due to subscription not ready

I am seeing a crash on IE 11 only (Chrome, Firefox and Edge are OK) in blaze.js line 505-506 a function named DOMRange.prototype.detach

The code (from the browser’s debugger) reads

} else {
  var placeholder = this.emptyRangePlaceholder;
  this.parentElement.removeChild(placeholder);

Trying to minimize the application I found the issue was related to a subscription.

The application is a dashboard with multiple graphs, all using the same data but each graph needs to apply a specific treatment (filterning, statistics, etc). The subscriptions are on the dashboard template which also contains some buttons to select view, table, dates, etc.

<template name="dashboard">
  <div class="ui scrolling container">
    {{> view_selector }}
    {{> table_selector }}
    {{> day_selector }}
    {{> Template.dynamic template=(route) }}
  </div>
</template>

Depending on the view selected, the template loaded dynamically will have different charts. The subscription to the data being on the dashboard template.

This works in all browsers but IE 11. Now the crash in IE disappears if I protect the dynamic template with a subscriptionReady

{{#if Template.subscriptionsReady}}
{{> Template.dynamic template=(route) }}
{{/if}}

My problem is I am not sure if that code is supposed to work without the subscriptionReady or not. As a result, I don’t really know if

  1. This is a bug in my code and I fixed it
  2. This is a bug in my code and I did a change that happened to have hidden it without fixing the real issue
  3. This is a bug in Blaze and I should report it
  4. This is a bug in IE11 and life is hard

Issue between Semantic UI and IE11 due to headless tables and MutationObserver from Semantic UI dropdowns. Reported as issue #6081