diff --git a/addon/components/mobiledoc-editor/component.js b/addon/components/mobiledoc-editor/component.js index d876d69..c88be2f 100644 --- a/addon/components/mobiledoc-editor/component.js +++ b/addon/components/mobiledoc-editor/component.js @@ -316,7 +316,7 @@ export default Component.extend({ didRender() { let editor = this.get('editor'); if (!editor.hasRendered) { - let editorElement = this.$('.mobiledoc-editor__editor')[0]; + let editorElement = this.element.querySelector('.mobiledoc-editor__editor'); this._isRenderingEditor = true; try { editor.render(editorElement); diff --git a/addon/components/mobiledoc-link-prompt/component.js b/addon/components/mobiledoc-link-prompt/component.js index 80d17f1..cad6aff 100644 --- a/addon/components/mobiledoc-link-prompt/component.js +++ b/addon/components/mobiledoc-link-prompt/component.js @@ -5,6 +5,6 @@ export default Component.extend({ layout, didInsertElement() { - this.$('input').focus(); + this.element.querySelector('input').focus(); } }); diff --git a/addon/components/tether-to-selection/component.js b/addon/components/tether-to-selection/component.js index 042ee22..8325a1e 100644 --- a/addon/components/tether-to-selection/component.js +++ b/addon/components/tether-to-selection/component.js @@ -53,13 +53,13 @@ export default Component.extend({ let isOffscreen = isOutOfBounds(dialogRect, boundingRect); if (isOffscreen) { let dialogAnchor = this.get('dialogAnchor'); - this.$().css({ - position: 'fixed', - left: isOffscreen.left ? DIALOG_MARGIN : (isOffscreen.right ? 'auto' : dialogAnchor.left), - right: isOffscreen.right ? DIALOG_MARGIN : 'auto', - top: isOffscreen.top ? DIALOG_MARGIN : 'auto', - bottom: isOffscreen.bottom ? DIALOG_MARGIN : (isOffscreen.top ? 'auto' : dialogAnchor.bottom) - }); + this.element.setAttribute('style', ` + position: 'fixed'; + left: ${isOffscreen.left ? DIALOG_MARGIN : (isOffscreen.right ? 'auto' : dialogAnchor.left)}; + right: ${isOffscreen.right ? DIALOG_MARGIN : 'auto'}; + top: ${isOffscreen.top ? DIALOG_MARGIN : 'auto'}; + bottom: ${isOffscreen.bottom ? DIALOG_MARGIN : (isOffscreen.top ? 'auto' : dialogAnchor.bottom)}; + `); } }); }