diff --git a/src/trix/core/helpers/custom_elements.coffee b/src/trix/core/helpers/custom_elements.coffee index 2789a6c7b..3cef09007 100644 --- a/src/trix/core/helpers/custom_elements.coffee +++ b/src/trix/core/helpers/custom_elements.coffee @@ -78,7 +78,8 @@ registerElement = do -> Object.setPrototypeOf(constructor.prototype, HTMLElement.prototype) Object.setPrototypeOf(constructor, HTMLElement) Object.defineProperties(constructor.prototype, properties) - window.customElements.define(tagName, constructor) + unless window.customElements.get(tagName) + window.customElements.define(tagName, constructor) constructor else (tagName, properties) ->