Skip to content

Commit

Permalink
5.20.2
Browse files Browse the repository at this point in the history
  • Loading branch information
j0k3r committed Jun 17, 2016
1 parent 00183a5 commit a07ac0c
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 12 deletions.
9 changes: 9 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
5.20.2 / 2016-06-17
==================
(5.20.1 was skipped because of a bad release)
* Fix test failure in Chrome 51 #1114
* Fix slow CSS selector #1115
* Improve documentation for toolbar.relativeContainer option #1122
* Fix cursor rendering incorrectly in Firefox #1113


5.20.0 / 2016-06-02
==================
* Fix anchor-preview bug where click preview no longer prefills href into anchor form
Expand Down
20 changes: 15 additions & 5 deletions dist/css/medium-editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,23 @@
.medium-editor-placeholder:after {
content: attr(data-placeholder) !important;
font-style: italic;
left: 0;
position: absolute;
left: 0;
top: 0;
white-space: pre;
padding: inherit;
margin: inherit; }

.medium-editor-placeholder-relative {
position: relative; }
.medium-editor-placeholder-relative:after {
content: attr(data-placeholder) !important;
font-style: italic;
position: relative;
white-space: pre;
padding: inherit;
margin: inherit; }

.medium-toolbar-arrow-under:after, .medium-toolbar-arrow-over:before {
border-style: solid;
content: '';
Expand Down Expand Up @@ -206,14 +216,14 @@
content: "";
display: table; }

[data-medium-editor-element] {
.medium-editor-element {
word-wrap: break-word;
min-height: 30px; }
[data-medium-editor-element] img {
.medium-editor-element img {
max-width: 100%; }
[data-medium-editor-element] sub {
.medium-editor-element sub {
vertical-align: sub; }
[data-medium-editor-element] sup {
.medium-editor-element sup {
vertical-align: super; }

.medium-editor-hidden {
Expand Down
2 changes: 1 addition & 1 deletion dist/css/medium-editor.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 16 additions & 2 deletions dist/js/medium-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -5591,13 +5591,25 @@ MediumEditor.extensions = {};

showPlaceholder: function (el) {
if (el) {
el.classList.add('medium-editor-placeholder');
// https://github.com/yabwe/medium-editor/issues/234
// In firefox, styling the placeholder with an absolutely positioned
// pseudo element causes the cursor to appear in a bad location
// when the element is completely empty, so apply a different class to
// style it with a relatively positioned pseudo element
if (MediumEditor.util.isFF && el.childNodes.length === 0) {
el.classList.add('medium-editor-placeholder-relative');
el.classList.remove('medium-editor-placeholder');
} else {
el.classList.add('medium-editor-placeholder');
el.classList.remove('medium-editor-placeholder-relative');
}
}
},

hidePlaceholder: function (el) {
if (el) {
el.classList.remove('medium-editor-placeholder');
el.classList.remove('medium-editor-placeholder-relative');
}
},

Expand Down Expand Up @@ -6776,6 +6788,7 @@ MediumEditor.extensions = {};
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 @@ -7064,6 +7077,7 @@ MediumEditor.extensions = {};
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 Expand Up @@ -7650,7 +7664,7 @@ MediumEditor.parseVersionString = function (release) {

MediumEditor.version = MediumEditor.parseVersionString.call(this, ({
// grunt-bump looks for this:
'version': '5.20.0'
'version': '5.20.2'
}).version);

return MediumEditor;
Expand Down
4 changes: 2 additions & 2 deletions dist/js/medium-editor.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "medium-editor",
"version": "5.20.0",
"version": "5.20.2",
"author": "Davi Ferreira <hi@daviferreira.com>",
"contributors": [
{
Expand Down
2 changes: 1 addition & 1 deletion src/js/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ MediumEditor.parseVersionString = function (release) {

MediumEditor.version = MediumEditor.parseVersionString.call(this, ({
// grunt-bump looks for this:
'version': '5.20.0'
'version': '5.20.2'
}).version);

0 comments on commit a07ac0c

Please sign in to comment.