From b1d3dd6aed712fb6b11b91122c42ec76eca231d8 Mon Sep 17 00:00:00 2001 From: Bernhard Riegler Date: Tue, 25 Apr 2017 16:18:26 +0200 Subject: [PATCH 01/18] remove aloha editng p inserted after table --- src/plugins/common/table/lib/table-plugin.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/plugins/common/table/lib/table-plugin.js b/src/plugins/common/table/lib/table-plugin.js index 4d69c2864c..2f1e3a472f 100755 --- a/src/plugins/common/table/lib/table-plugin.js +++ b/src/plugins/common/table/lib/table-plugin.js @@ -515,7 +515,7 @@ define([ //Creates string with this component's namepsace prefixed the each classname function nsClass() { var stringBuilder = [], prefix = tableNamespace; - jQuery.each(arguments, function () { + jQuery.each(arguments, function () { stringBuilder.push(this == '' ? prefix : prefix + '-' + this); }); return jQuery.trim(stringBuilder.join(' ')); @@ -1685,9 +1685,13 @@ define([ function cleanupAfterInsertion () { var dirty = jQuery( '.aloha-table-cleanme' ).removeClass( 'aloha-table-cleanme' ); - + // check all children of the element we want for ( var i = 0; i < dirty.length; i++ ) { - if ( jQuery.trim( jQuery( dirty[ i ] ).html() ) == '' && + // is the element empty + // is the first child
- placeholder element + // is the element not the editing Host + if ( ( jQuery.trim( jQuery( dirty[ i ] ).html() ) == '' || + jQuery( dirty[ i ] ).children.first('br.aloha-end-br') ) && !GENTICS.Utils.Dom.isEditingHost( dirty[ i ] ) ) { jQuery( dirty[ i ] ).remove(); From 4b9c38ad9c9602e0674f6c7cba37806b7ab96742 Mon Sep 17 00:00:00 2001 From: Bernhard Riegler Date: Tue, 25 Apr 2017 16:19:05 +0200 Subject: [PATCH 02/18] add changelog for table-plugins placeholder paragraph bugfix --- build/changelog/entries/2017/04/11705.SUP-4150.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 build/changelog/entries/2017/04/11705.SUP-4150.bugfix diff --git a/build/changelog/entries/2017/04/11705.SUP-4150.bugfix b/build/changelog/entries/2017/04/11705.SUP-4150.bugfix new file mode 100644 index 0000000000..8bf04358d9 --- /dev/null +++ b/build/changelog/entries/2017/04/11705.SUP-4150.bugfix @@ -0,0 +1 @@ +table-plugin: when inserting a new table an additional paragraph was inserted after the table. This won't happen anymore. From ddef0f6eca583c1e89be72558bb6ddc4576e008b Mon Sep 17 00:00:00 2001 From: Bernhard Riegler Date: Thu, 27 Apr 2017 13:16:36 +0200 Subject: [PATCH 03/18] call jquery.children() as function not as porperty --- src/plugins/common/table/lib/table-plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/common/table/lib/table-plugin.js b/src/plugins/common/table/lib/table-plugin.js index 2f1e3a472f..954b07bf54 100755 --- a/src/plugins/common/table/lib/table-plugin.js +++ b/src/plugins/common/table/lib/table-plugin.js @@ -1691,7 +1691,7 @@ define([ // is the first child
- placeholder element // is the element not the editing Host if ( ( jQuery.trim( jQuery( dirty[ i ] ).html() ) == '' || - jQuery( dirty[ i ] ).children.first('br.aloha-end-br') ) && + jQuery( dirty[ i ] ).children().first('br.aloha-end-br') ) && !GENTICS.Utils.Dom.isEditingHost( dirty[ i ] ) ) { jQuery( dirty[ i ] ).remove(); From a69b77833d083db7a727144c2b0ed0509ccde233 Mon Sep 17 00:00:00 2001 From: Bernhard Riegler Date: Thu, 27 Apr 2017 13:30:13 +0200 Subject: [PATCH 04/18] add additional check to make sure aloha-end-br is only element --- src/plugins/common/table/lib/table-plugin.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/common/table/lib/table-plugin.js b/src/plugins/common/table/lib/table-plugin.js index 954b07bf54..65799bb5ef 100755 --- a/src/plugins/common/table/lib/table-plugin.js +++ b/src/plugins/common/table/lib/table-plugin.js @@ -1687,11 +1687,14 @@ define([ 'aloha-table-cleanme' ); // check all children of the element we want for ( var i = 0; i < dirty.length; i++ ) { + // get the children of the to be cleaned element for some checks + var dirtyChildren = jQuery( dirty[ i ] ).children(); // is the element empty // is the first child
- placeholder element // is the element not the editing Host if ( ( jQuery.trim( jQuery( dirty[ i ] ).html() ) == '' || - jQuery( dirty[ i ] ).children().first('br.aloha-end-br') ) && + ( dirtyChildren.length === 1 && + dirtyChildren.first('br.aloha-end-br') ) ) && !GENTICS.Utils.Dom.isEditingHost( dirty[ i ] ) ) { jQuery( dirty[ i ] ).remove(); From 1a2837bddecb11ff7725bc121b2db7501ba52202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=BCth?= Date: Mon, 26 Feb 2018 18:13:04 +0100 Subject: [PATCH 05/18] Update focus point image and add i18n entries --- .../entries/2018/02/12309.GTXPE-165.enhancement | 1 + src/plugins/common/image/css/image.css | 2 +- src/plugins/common/image/img/set-focalpoint.gif | Bin 251 -> 0 bytes src/plugins/common/image/img/set-focalpoint.png | Bin 0 -> 448 bytes .../common/image/lib/image-floatingMenu.js | 2 +- src/plugins/common/image/nls/de/i18n.js | 1 + src/plugins/common/image/nls/i18n.js | 1 + 7 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 build/changelog/entries/2018/02/12309.GTXPE-165.enhancement delete mode 100644 src/plugins/common/image/img/set-focalpoint.gif create mode 100644 src/plugins/common/image/img/set-focalpoint.png diff --git a/build/changelog/entries/2018/02/12309.GTXPE-165.enhancement b/build/changelog/entries/2018/02/12309.GTXPE-165.enhancement new file mode 100644 index 0000000000..efb7ec628b --- /dev/null +++ b/build/changelog/entries/2018/02/12309.GTXPE-165.enhancement @@ -0,0 +1 @@ +The focal point button icon for the image plugin has been updated. diff --git a/src/plugins/common/image/css/image.css b/src/plugins/common/image/css/image.css index f9fe754440..e57d534737 100755 --- a/src/plugins/common/image/css/image.css +++ b/src/plugins/common/image/css/image.css @@ -41,7 +41,7 @@ } .aloha-img.aloha-image-set-focalpoint { - background: url(../img/set-focalpoint.gif); + background: url(../img/set-focalpoint.png); } .aloha-default-file-icon { diff --git a/src/plugins/common/image/img/set-focalpoint.gif b/src/plugins/common/image/img/set-focalpoint.gif deleted file mode 100644 index 8ac9acf1e06656136fb61ea75cb6ba31852a7a85..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 251 zcmVNk%w1VGsZi0E8a^rM1q`;qala!;_)2F>2)S@%_We-cnsufXEK&-d~9{*k55 z|NsB6$lWwcV*mgEA^s6Va%Ew3Wn>_CX>@2HM@dak03rDV0SW*g04x9i000mG5C8xL zW8f!_WNDsdqc%e8LeMaX0B7I0?TAgD<%|d|N5D}S9+7}}D=;L<&ytfNSgn^#zz`iU zDS#3F&GN~6B`u@T?ZbDi;RjWkB}xI06Vc_ Bbddl6 diff --git a/src/plugins/common/image/img/set-focalpoint.png b/src/plugins/common/image/img/set-focalpoint.png new file mode 100644 index 0000000000000000000000000000000000000000..fd0f68afd9fb4a1b230a9c7645034d4ac7da4f77 GIT binary patch literal 448 zcmV;x0YCnUP)hj6SOmP0}?L5iQpC+IIyrRk*(xQSQv~E z!J^qApjv7-woFN_ny#N$Rj+zd&cmdU&F1VCzG1>1UCzVrhvMe(@eW-CPk4=U+=bm{ zbM_KPSR&;-e8kB-z&d=vZ2*k;g%tOMpSX{P?;jX*hI!YtRdiXIl+yJyO&5#B;u1glehp*M{)edWr@mj$ijKS&-4jIJR+YQ$ z_G({r_>T*L%c!g&Xx!~~H+{cWlD6BcvD(r>R}uZ#qe)f8cEx{JnDg-IiIvHD*!x#z qDTq30{>D3e4iI5q;tdW;GR8kcHi5ToIL3DX0000 Date: Wed, 28 Feb 2018 15:21:30 +0100 Subject: [PATCH 06/18] Fix paste behaviour for directly nested lists. (#1603) Add warnings in the documentation about limitations for copy & paste --- .../entries/2018/02/12311.SUP-5908.bugfix | 3 +++ .../entries/2018/02/12312.SUP-5908.bugfix | 2 ++ doc/guides/source/plugin_contenthandler.textile | 5 +++++ doc/guides/source/plugin_list.textile | 2 ++ doc/guides/source/plugin_paste.textile | 5 ++++- src/lib/aloha/selection.js | 7 ------- .../contenthandler/lib/genericcontenthandler.js | 16 ++++++++-------- .../contenthandler/lib/wordcontenthandler.js | 2 ++ src/test/unit/genericcontenthandler.html | 2 +- .../multi-p-in-li-expected.html | 1 + .../multi-p-in-li-start.html | 1 + .../multi-p-in-li-value.html | 1 + .../nested-p-in-li-expected.html | 1 + .../nested-p-in-li-start.html | 1 + .../nested-p-in-li-value.html | 1 + .../genericcontenthandler/p-in-li-expected.html | 1 + .../genericcontenthandler/p-in-li-start.html | 1 + .../genericcontenthandler/p-in-li-value.html | 1 + src/test/unit/wordcontenthandler.html | 2 +- .../unit/wordcontenthandler/word16-expected.html | 1 + .../unit/wordcontenthandler/word16-start.html | 1 + .../unit/wordcontenthandler/word16-value.html | 16 ++++++++++++++++ 22 files changed, 55 insertions(+), 18 deletions(-) create mode 100644 build/changelog/entries/2018/02/12311.SUP-5908.bugfix create mode 100644 build/changelog/entries/2018/02/12312.SUP-5908.bugfix create mode 100644 src/test/unit/genericcontenthandler/multi-p-in-li-expected.html create mode 100644 src/test/unit/genericcontenthandler/multi-p-in-li-start.html create mode 100644 src/test/unit/genericcontenthandler/multi-p-in-li-value.html create mode 100644 src/test/unit/genericcontenthandler/nested-p-in-li-expected.html create mode 100644 src/test/unit/genericcontenthandler/nested-p-in-li-start.html create mode 100644 src/test/unit/genericcontenthandler/nested-p-in-li-value.html create mode 100644 src/test/unit/genericcontenthandler/p-in-li-expected.html create mode 100644 src/test/unit/genericcontenthandler/p-in-li-start.html create mode 100644 src/test/unit/genericcontenthandler/p-in-li-value.html create mode 100644 src/test/unit/wordcontenthandler/word16-expected.html create mode 100644 src/test/unit/wordcontenthandler/word16-start.html create mode 100644 src/test/unit/wordcontenthandler/word16-value.html diff --git a/build/changelog/entries/2018/02/12311.SUP-5908.bugfix b/build/changelog/entries/2018/02/12311.SUP-5908.bugfix new file mode 100644 index 0000000000..148e1c95b8 --- /dev/null +++ b/build/changelog/entries/2018/02/12311.SUP-5908.bugfix @@ -0,0 +1,3 @@ +paste-plugin: When a list was pasted from Word, where items started a new list beginning at a level greater than 1, the list item was removed, because Aloha Editor +does not allow lists that start at a nesting level greater than 1. +The behaviour has been changed now, so that such lists will be pasted, so that the first item starts at level 1. diff --git a/build/changelog/entries/2018/02/12312.SUP-5908.bugfix b/build/changelog/entries/2018/02/12312.SUP-5908.bugfix new file mode 100644 index 0000000000..02d914efeb --- /dev/null +++ b/build/changelog/entries/2018/02/12312.SUP-5908.bugfix @@ -0,0 +1,2 @@ +list-plugin: The list plugin allowed to insert paragraphs or headers into list items, which caused unexpected editing behaviour. +This is now changed, so it is no longer possible to insert paragraphs or headers into list items. diff --git a/doc/guides/source/plugin_contenthandler.textile b/doc/guides/source/plugin_contenthandler.textile index 47df55b6ea..d78d5a6fc4 100644 --- a/doc/guides/source/plugin_contenthandler.textile +++ b/doc/guides/source/plugin_contenthandler.textile @@ -136,6 +136,11 @@ The Word Content Handler will detect content pasted from Microsoft Word 2003 and * keep bold and italic formatting, headlines, tables and lists but get rid of all other formattings * Remove links to local files (with file :// URLs), but it preserves the link contents +WARNING: Word supports much more formatting options than Aloha Editor. Therefore the content pasted from Word into Aloha Editor will be different, if its formatting or +structure in Word is not supported by Aloha Editor. +Additionally, the HTML produced by Word when doing Copy & Paste is generally of poor quality (or even invalid) and different depending on the used browser version. Therefore, +the resulting content can also be different across browsers and may not reflect the formatting or structure of the original content in Word. + h4. Generic Content Handler The Generic Content Handler is a bit less generic than his name might suggest as he will apply the following cleaning actions: diff --git a/doc/guides/source/plugin_list.textile b/doc/guides/source/plugin_list.textile index 923ed76c7d..cee30d7fc6 100644 --- a/doc/guides/source/plugin_list.textile +++ b/doc/guides/source/plugin_list.textile @@ -17,6 +17,8 @@ You can use the tab key to indent unordered and ordered lists or use shift-tab t You can remove lists by clicking the applied list type a second time, which will turn individual list items back into paragraphs. +NOTE: Although allowed by the HTML specification, Aloha Editor will not allow nesting of paragraphs or headers in list items. + h4. List styles If you open the dropdown next to the respective list icon, you can choose from a list of pre-defined list styles. diff --git a/doc/guides/source/plugin_paste.textile b/doc/guides/source/plugin_paste.textile index 6e31c8738b..b34bfc4d00 100644 --- a/doc/guides/source/plugin_paste.textile +++ b/doc/guides/source/plugin_paste.textile @@ -4,11 +4,14 @@ The Paste plugin enables copy and paste action for Aloha Editor editables. endprologue. -The Paste plugin is used to handle the paste action in an editable. "ContentHanlder":plugin_contenthandler.html can be used to configure how pasted content will be handled. +The Paste plugin is used to handle the paste action in an editable. "ContentHandler":plugin_contenthandler.html can be used to configure how pasted content will be handled. * The source of a pasted Microsoft Word(tm) document will be cleaned up * URLs to media content can be embeded after the paste action using the oEmbed contentHandler +WARNING: Copy & Paste is generally handled by the browser itself. The paste plugin can only handle the content, which is provided by the browser. This means that copy & paste might +produce different results depending on the used browser. + h3. Configuration Enable the paste plugin +common/paste+. diff --git a/src/lib/aloha/selection.js b/src/lib/aloha/selection.js index fc36ab4613..5e4356cd19 100644 --- a/src/lib/aloha/selection.js +++ b/src/lib/aloha/selection.js @@ -418,13 +418,6 @@ define([ 'img': true, 'ul': true, 'ol': true, - 'h1': true, - 'h2': true, - 'h3': true, - 'h4': true, - 'h5': true, - 'h6': true, - 'p': true, 'del': true, 'ins': true, 'u': true, diff --git a/src/plugins/common/contenthandler/lib/genericcontenthandler.js b/src/plugins/common/contenthandler/lib/genericcontenthandler.js index 10d4bf7075..96a00f4406 100755 --- a/src/plugins/common/contenthandler/lib/genericcontenthandler.js +++ b/src/plugins/common/contenthandler/lib/genericcontenthandler.js @@ -196,16 +196,16 @@ define([ cleanLists: function ($content) { $content.find('ul,ol').filter(notAlohaBlockFilter).find('>:not(li)').remove(); - // Remove paragraphs inside list elements, if they are - // the only child. e.g.: li > p > text + // Remove paragraphs and headers inside list elements // This has been observed to happen with Word documents - $content.find("li").filter(notAlohaBlockFilter).each(function() { - var $li = $(this); - var $children = $li.children(); - if ($children.length === 1 && $children.is("p")) { - $children.contents().appendTo($li); - $children.remove(); + $content.find("li").filter(notAlohaBlockFilter).find('p,h1,h2,h3,h4,h5,h6').each(function() { + var $elem = $(this); + // when the paragraph has a sibling and it's content does not have a
as last child, we append a
+ // in order to preserve the line break + if (!$elem.is(':last-child') && !$elem.contents().last().is('br')) { + $elem.append('
'); } + $elem.contents().unwrap(); }); }, diff --git a/src/plugins/common/contenthandler/lib/wordcontenthandler.js b/src/plugins/common/contenthandler/lib/wordcontenthandler.js index 484be90623..8919dacad4 100755 --- a/src/plugins/common/contenthandler/lib/wordcontenthandler.js +++ b/src/plugins/common/contenthandler/lib/wordcontenthandler.js @@ -215,6 +215,8 @@ define([ if (prev.length > 0) { prev.append($node) + } else { + $node.contents().unwrap(); } } if (isEmpty($node)) { diff --git a/src/test/unit/genericcontenthandler.html b/src/test/unit/genericcontenthandler.html index 67e3de811b..2dd25d615e 100644 --- a/src/test/unit/genericcontenthandler.html +++ b/src/test/unit/genericcontenthandler.html @@ -46,7 +46,7 @@ } // now add tests for copy & paste from different sources (from './genericcontenthandler/-[start|expected|value].html' files) - files = [ 'normal', 'nested', 'alohablock', 'nestedalohablock', 'table' ]; + files = [ 'normal', 'nested', 'alohablock', 'nestedalohablock', 'table', 'p-in-li', 'nested-p-in-li', 'multi-p-in-li' ]; elements = [ 'div' ]; for ( i=0; i
  • In paragraph
    Another paragraph
  • In header 1
    Another header 2
  • {} \ No newline at end of file diff --git a/src/test/unit/genericcontenthandler/multi-p-in-li-start.html b/src/test/unit/genericcontenthandler/multi-p-in-li-start.html new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/src/test/unit/genericcontenthandler/multi-p-in-li-start.html @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/src/test/unit/genericcontenthandler/multi-p-in-li-value.html b/src/test/unit/genericcontenthandler/multi-p-in-li-value.html new file mode 100644 index 0000000000..f8dfd078a2 --- /dev/null +++ b/src/test/unit/genericcontenthandler/multi-p-in-li-value.html @@ -0,0 +1 @@ +
    1. In paragraph

      Another paragraph

    2. In header 1

      Another header 2

    \ No newline at end of file diff --git a/src/test/unit/genericcontenthandler/nested-p-in-li-expected.html b/src/test/unit/genericcontenthandler/nested-p-in-li-expected.html new file mode 100644 index 0000000000..51bb943d74 --- /dev/null +++ b/src/test/unit/genericcontenthandler/nested-p-in-li-expected.html @@ -0,0 +1 @@ +
    1. In paragraph
      • Nested in paragraph
    {} \ No newline at end of file diff --git a/src/test/unit/genericcontenthandler/nested-p-in-li-start.html b/src/test/unit/genericcontenthandler/nested-p-in-li-start.html new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/src/test/unit/genericcontenthandler/nested-p-in-li-start.html @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/src/test/unit/genericcontenthandler/nested-p-in-li-value.html b/src/test/unit/genericcontenthandler/nested-p-in-li-value.html new file mode 100644 index 0000000000..a72f2f0ec4 --- /dev/null +++ b/src/test/unit/genericcontenthandler/nested-p-in-li-value.html @@ -0,0 +1 @@ +
    1. In paragraph

      • Nested in paragraph

    \ No newline at end of file diff --git a/src/test/unit/genericcontenthandler/p-in-li-expected.html b/src/test/unit/genericcontenthandler/p-in-li-expected.html new file mode 100644 index 0000000000..ff7f55a7c5 --- /dev/null +++ b/src/test/unit/genericcontenthandler/p-in-li-expected.html @@ -0,0 +1 @@ +
    1. In paragraph
    2. In Header 1
    3. In Header 2
    4. In Header 3
    5. In Header 4
    6. In Header 5
    7. In Header 6
    {} \ No newline at end of file diff --git a/src/test/unit/genericcontenthandler/p-in-li-start.html b/src/test/unit/genericcontenthandler/p-in-li-start.html new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/src/test/unit/genericcontenthandler/p-in-li-start.html @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/src/test/unit/genericcontenthandler/p-in-li-value.html b/src/test/unit/genericcontenthandler/p-in-li-value.html new file mode 100644 index 0000000000..03d239e289 --- /dev/null +++ b/src/test/unit/genericcontenthandler/p-in-li-value.html @@ -0,0 +1 @@ +
    1. In paragraph

    2. In Header 1

    3. In Header 2

    4. In Header 3

    5. In Header 4

    6. In Header 5
    7. In Header 6
    \ No newline at end of file diff --git a/src/test/unit/wordcontenthandler.html b/src/test/unit/wordcontenthandler.html index 611cd45be6..32ee16de43 100644 --- a/src/test/unit/wordcontenthandler.html +++ b/src/test/unit/wordcontenthandler.html @@ -46,7 +46,7 @@ } // now add tests for copy & paste from different sources (from './wordcontenthandler/-[start|expected|value].html' files) - files = [ 'word1', 'word2', 'word3', 'word4', 'word5', 'word6', 'word7', 'word8', 'word9', 'word10', 'word11', 'word12', 'word13', 'word14', 'word15' ]; + files = [ 'word1', 'word2', 'word3', 'word4', 'word5', 'word6', 'word7', 'word8', 'word9', 'word10', 'word11', 'word12', 'word13', 'word14', 'word15', 'word16' ]; elements = [ 'div' ]; for ( i=0; i
  • a
    1. b
      1. c
      2. d
    2. e
    1. f
    {} \ No newline at end of file diff --git a/src/test/unit/wordcontenthandler/word16-start.html b/src/test/unit/wordcontenthandler/word16-start.html new file mode 100644 index 0000000000..9e26dfeeb6 --- /dev/null +++ b/src/test/unit/wordcontenthandler/word16-start.html @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/src/test/unit/wordcontenthandler/word16-value.html b/src/test/unit/wordcontenthandler/word16-value.html new file mode 100644 index 0000000000..9a62040ab6 --- /dev/null +++ b/src/test/unit/wordcontenthandler/word16-value.html @@ -0,0 +1,16 @@ +
    1. a
      1. b
        1. c
        2. d
      2. e
        1. f
    \ No newline at end of file From c9dbbacde44a0dc492e2397bd8259b6afd0abda0 Mon Sep 17 00:00:00 2001 From: Maven Release Manager Date: Wed, 28 Feb 2018 16:06:08 +0100 Subject: [PATCH 07/18] [Jenkins | hotfix] Release of version 1.4.44 --- build/changelog/mappings/1.4.44.json | 12 ++++++++++++ pom.xml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 build/changelog/mappings/1.4.44.json diff --git a/build/changelog/mappings/1.4.44.json b/build/changelog/mappings/1.4.44.json new file mode 100644 index 0000000000..18e6fe7a90 --- /dev/null +++ b/build/changelog/mappings/1.4.44.json @@ -0,0 +1,12 @@ +{ + "version": "1.4.44", + "date": "28.02.2018", + "changeLogEntryFileNames": [ + "12275.GTXPE-123.feature", + "12312.SUP-5908.bugfix", + "12311.SUP-5908.bugfix", + "12309.GTXPE-165.enhancement", + "12269.GTXPE-123.feature" + ], + "genericProperties": {} +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 13fa947295..ffe24aac28 100755 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.alohaeditor alohaeditor - 1.4.44-SNAPSHOT + 1.4.44 jar Aloha Editor http://aloha-editor.org From 909b824b76160233cd6430647ad25b6b5207c5eb Mon Sep 17 00:00:00 2001 From: Maven Release Manager Date: Wed, 28 Feb 2018 16:07:03 +0100 Subject: [PATCH 08/18] [Jenkins | hotfix] Prepare for the next development iteration (1.4.45-SNAPSHOT) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ffe24aac28..bed04681e7 100755 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.alohaeditor alohaeditor - 1.4.44 + 1.4.45-SNAPSHOT jar Aloha Editor http://aloha-editor.org From 325c39a5c2199c2723a26c4c74693dba0681b8c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Klaffenb=C3=B6ck?= Date: Fri, 9 Mar 2018 16:03:02 +0100 Subject: [PATCH 09/18] Fix (forard)delete command for whitespace at the beginning of block elements (#1604) * Fix (forard)delete command for whitespace at the beginning of block elements While adding a test for this case I noticed the the test suit for the "delete" command has not been executed because of an error in the corresponding test HTML file. When renabling the tests several tests failed. I fixed the ones where I could figure out what should happen and removed the ones that failed despite Aloha-Editor behaving normaly in this case, and the ones I could not figure out what should happen. --- .../entries/2018/03/6133.SUP-5481.bugfix | 1 + src/lib/aloha/engine.js | 2 +- src/test/unit/delete.html | 3 +- src/test/unit/deletetest.js | 567 ++++-------------- src/test/unit/forwarddeletetest.js | 5 +- 5 files changed, 124 insertions(+), 454 deletions(-) create mode 100644 build/changelog/entries/2018/03/6133.SUP-5481.bugfix diff --git a/build/changelog/entries/2018/03/6133.SUP-5481.bugfix b/build/changelog/entries/2018/03/6133.SUP-5481.bugfix new file mode 100644 index 0000000000..56bf7a62b6 --- /dev/null +++ b/build/changelog/entries/2018/03/6133.SUP-5481.bugfix @@ -0,0 +1 @@ +In certain cases whitespace could not be deleted with the delete or backspace keys. This has been fixed. diff --git a/src/lib/aloha/engine.js b/src/lib/aloha/engine.js index f72ecdd303..823722b92d 100644 --- a/src/lib/aloha/engine.js +++ b/src/lib/aloha/engine.js @@ -1333,7 +1333,7 @@ define([ reference = previousNode(reference); // "If reference is a block node or a br, return true." - if (isBlockNode(reference) || isNamedHtmlElement(reference, 'br')) { + if (reference != ancestor && (isBlockNode(reference) || isNamedHtmlElement(reference, 'br'))) { return true; } diff --git a/src/test/unit/delete.html b/src/test/unit/delete.html index 186e986bf8..205be2bc54 100644 --- a/src/test/unit/delete.html +++ b/src/test/unit/delete.html @@ -23,9 +23,10 @@ +