Skip to content

Commit

Permalink
Minor summer update
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Pulges committed Jul 1, 2015
1 parent eee73c7 commit 0f44ca4
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 28 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.textile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
*wysihtml5x 0.5.0-beta11* (July 1, 2015)
* Minor release that fixes some misbehaviours in Safari

*wysihtml5x 0.5.0-beta10* (June 4, 2015)
* Fixes issue where block level elements can be inserted into inline elements on some cases

Expand Down
19 changes: 14 additions & 5 deletions dist/wysihtml-toolbar.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license wysihtml v0.5.0-beta10
* @license wysihtml v0.5.0-beta11
* https://github.com/Voog/wysihtml
*
* Author: Christopher Blum (https://github.com/tiff)
Expand All @@ -10,7 +10,7 @@
*
*/
var wysihtml5 = {
version: "0.5.0-beta10",
version: "0.5.0-beta11",

// namespaces
commands: {},
Expand Down Expand Up @@ -388,6 +388,7 @@ var wysihtml5 = {

ret = (e.childNodes.length !== 1 || s.anchorNode !== e.firstChild || s.anchorOffset !== 2);
e.parentNode.removeChild(e);
s.removeAllRanges();
return ret;
}
};
Expand Down Expand Up @@ -5073,7 +5074,7 @@ wysihtml5.browser = (function() {
It is on window but cannot return text/html
Should actually check for clipboardData on paste event, but cannot in firefox
*/
supportsModenPaste: function () {
supportsModernPaste: function () {
return !("clipboardData" in window);
},

Expand Down Expand Up @@ -10044,7 +10045,15 @@ wysihtml5.quirks.ensureProperClearing = (function() {

if (includePrevLeaves) {
var prevNode = this.getPreviousNode(startNode, true),
prevLeaf = prevNode ? wysihtml5.dom.domNode(prevNode).lastLeafNode() : null;
prevLeaf = null;

if(prevNode) {
if (prevNode.nodeType === 1 && wysihtml5.dom.hasClass(prevNode, this.unselectableClass)) {
prevLeaf = prevNode;
} else {
prevLeaf = wysihtml5.dom.domNode(prevNode).lastLeafNode();
}
}

if (prevLeaf) {
return {
Expand Down Expand Up @@ -15394,7 +15403,7 @@ wysihtml5.views.View = Base.extend(
var oldHtml,
cleanHtml;

if (wysihtml5.browser.supportsModenPaste()) {
if (wysihtml5.browser.supportsModernPaste()) {
this.on("paste:composer", function(event) {
event.preventDefault();
oldHtml = wysihtml5.dom.getPastedHtml(event);
Expand Down
14 changes: 7 additions & 7 deletions dist/wysihtml-toolbar.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/wysihtml-toolbar.min.map

Large diffs are not rendered by default.

19 changes: 14 additions & 5 deletions dist/wysihtml.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license wysihtml v0.5.0-beta10
* @license wysihtml v0.5.0-beta11
* https://github.com/Voog/wysihtml
*
* Author: Christopher Blum (https://github.com/tiff)
Expand All @@ -10,7 +10,7 @@
*
*/
var wysihtml5 = {
version: "0.5.0-beta10",
version: "0.5.0-beta11",

// namespaces
commands: {},
Expand Down Expand Up @@ -388,6 +388,7 @@ var wysihtml5 = {

ret = (e.childNodes.length !== 1 || s.anchorNode !== e.firstChild || s.anchorOffset !== 2);
e.parentNode.removeChild(e);
s.removeAllRanges();
return ret;
}
};
Expand Down Expand Up @@ -5073,7 +5074,7 @@ wysihtml5.browser = (function() {
It is on window but cannot return text/html
Should actually check for clipboardData on paste event, but cannot in firefox
*/
supportsModenPaste: function () {
supportsModernPaste: function () {
return !("clipboardData" in window);
},

Expand Down Expand Up @@ -10044,7 +10045,15 @@ wysihtml5.quirks.ensureProperClearing = (function() {

if (includePrevLeaves) {
var prevNode = this.getPreviousNode(startNode, true),
prevLeaf = prevNode ? wysihtml5.dom.domNode(prevNode).lastLeafNode() : null;
prevLeaf = null;

if(prevNode) {
if (prevNode.nodeType === 1 && wysihtml5.dom.hasClass(prevNode, this.unselectableClass)) {
prevLeaf = prevNode;
} else {
prevLeaf = wysihtml5.dom.domNode(prevNode).lastLeafNode();
}
}

if (prevLeaf) {
return {
Expand Down Expand Up @@ -15394,7 +15403,7 @@ wysihtml5.views.View = Base.extend(
var oldHtml,
cleanHtml;

if (wysihtml5.browser.supportsModenPaste()) {
if (wysihtml5.browser.supportsModernPaste()) {
this.on("paste:composer", function(event) {
event.preventDefault();
oldHtml = wysihtml5.dom.getPastedHtml(event);
Expand Down
14 changes: 7 additions & 7 deletions dist/wysihtml.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/wysihtml.min.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wysihtml",
"version": "0.5.0-beta10",
"version": "0.5.0-beta11",
"devDependencies": {
"grunt": "~0.4.4",
"grunt-contrib-concat": "~0.4.0",
Expand All @@ -15,7 +15,7 @@
"dependencies": {
"rangy": "1.3.0"
},
"description": "h1. wysihtml 0.5.0-beta10",
"description": "h1. wysihtml 0.5.0-beta11",
"main": "Gruntfile.js",
"directories": {
"example": "examples",
Expand Down

0 comments on commit 0f44ca4

Please sign in to comment.