Skip to content

Commit

Permalink
Use class selector instead attribute selector
Browse files Browse the repository at this point in the history
  • Loading branch information
nmielnik committed Jun 6, 2016
1 parent 4a7c46e commit b1585f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion src/sass/medium-editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@import "util/clearfix";

// contenteditable rules
[data-medium-editor-element] {
.medium-editor-element {
word-wrap: break-word;
min-height: 30px;

Expand Down

0 comments on commit b1585f2

Please sign in to comment.