From b1585f231a94a7c8aab7a95cac4b4c84e27170d0 Mon Sep 17 00:00:00 2001 From: Nate Mielnik Date: Mon, 6 Jun 2016 01:11:51 -0400 Subject: [PATCH] Use class selector instead attribute selector --- src/js/core.js | 2 ++ src/sass/medium-editor.scss | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/core.js b/src/js/core.js index c203a7ef5..de987225e 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -413,6 +413,7 @@ var elementId = MediumEditor.util.guid(); element.setAttribute('data-medium-editor-element', true); + element.classList.add('medium-editor-element'); element.setAttribute('role', 'textbox'); element.setAttribute('aria-multiline', true); element.setAttribute('data-medium-editor-editor-index', editorId); @@ -701,6 +702,7 @@ element.removeAttribute('contentEditable'); element.removeAttribute('spellcheck'); element.removeAttribute('data-medium-editor-element'); + element.classList.remove('medium-editor-element'); element.removeAttribute('role'); element.removeAttribute('aria-multiline'); element.removeAttribute('medium-editor-index'); diff --git a/src/sass/medium-editor.scss b/src/sass/medium-editor.scss index 2f470d604..b33bd573c 100644 --- a/src/sass/medium-editor.scss +++ b/src/sass/medium-editor.scss @@ -9,7 +9,7 @@ @import "util/clearfix"; // contenteditable rules -[data-medium-editor-element] { +.medium-editor-element { word-wrap: break-word; min-height: 30px;