From 67c8c601ed3d827a4294c5cdcfbfae34abe340e2 Mon Sep 17 00:00:00 2001 From: Wojciech Wozniak Date: Tue, 5 Sep 2017 10:11:13 +0200 Subject: [PATCH 01/21] check if editor is in read only mode in drop handler --- plugins/clipboard/plugin.js | 5 +++++ tests/tickets/gh808/manual/1.html | 10 ++++++++++ tests/tickets/gh808/manual/1.md | 11 +++++++++++ 3 files changed, 26 insertions(+) create mode 100644 tests/tickets/gh808/manual/1.html create mode 100644 tests/tickets/gh808/manual/1.md diff --git a/plugins/clipboard/plugin.js b/plugins/clipboard/plugin.js index 5f6afc48611..50c6e6e6915 100644 --- a/plugins/clipboard/plugin.js +++ b/plugins/clipboard/plugin.js @@ -1508,6 +1508,11 @@ // Cancel native drop. evt.data.preventDefault(); + // #808 + if ( editor.readOnly ) { + return; + } + var target = evt.data.getTarget(), readOnly = target.isReadOnly(); diff --git a/tests/tickets/gh808/manual/1.html b/tests/tickets/gh808/manual/1.html new file mode 100644 index 00000000000..5dad71e90c5 --- /dev/null +++ b/tests/tickets/gh808/manual/1.html @@ -0,0 +1,10 @@ +
+ +

Some text

+
+ + diff --git a/tests/tickets/gh808/manual/1.md b/tests/tickets/gh808/manual/1.md new file mode 100644 index 00000000000..e76e038bb2c --- /dev/null +++ b/tests/tickets/gh808/manual/1.md @@ -0,0 +1,11 @@ +@bender-tags: 4.7.3, bug, 808 +@bender-ui: collapsed +@bender-ckeditor-plugins: wysiwygarea, widget, clipboard, image2 + +---- + +1. Start dragging widget. +1. Try to drop it below the text, when copy cursor is shown (warning: it's not shown in every browser). +1. repeat those steps for the selected paragraph + +**Expected result:** Nothing happens. From 56a9257e7e6531d404b1eef2de86113d824a7649 Mon Sep 17 00:00:00 2001 From: Wojciech Wozniak Date: Wed, 13 Sep 2017 11:01:34 +0200 Subject: [PATCH 02/21] unit test for drag&drop in read only mode, reanimed tests --- plugins/clipboard/plugin.js | 1 + tests/plugins/clipboard/drop.js | 21 +++++++++++++++++++ .../clipboard/manual/gh808.html} | 0 .../clipboard/manual/gh808.md} | 2 +- 4 files changed, 23 insertions(+), 1 deletion(-) rename tests/{tickets/gh808/manual/1.html => plugins/clipboard/manual/gh808.html} (100%) rename tests/{tickets/gh808/manual/1.md => plugins/clipboard/manual/gh808.md} (91%) diff --git a/plugins/clipboard/plugin.js b/plugins/clipboard/plugin.js index 50c6e6e6915..010d7a88dce 100644 --- a/plugins/clipboard/plugin.js +++ b/plugins/clipboard/plugin.js @@ -1509,6 +1509,7 @@ evt.data.preventDefault(); // #808 + // We shouldn't start drop action when editor is in read only mode if ( editor.readOnly ) { return; } diff --git a/tests/plugins/clipboard/drop.js b/tests/plugins/clipboard/drop.js index 68dcc5796b0..e7d15e3d30c 100644 --- a/tests/plugins/clipboard/drop.js +++ b/tests/plugins/clipboard/drop.js @@ -658,6 +658,7 @@ var testsForMultipleEditor = { assert.areSame( '

^foo

', bender.tools.getHtmlWithSelection( editor ), 'after drop' ); } ); }, + // #(2292) 'test internal drag and drop on editors margin': function( editor ) { var evt = bender.tools.mockDropEvent(); @@ -683,7 +684,27 @@ var testsForMultipleEditor = { expectedDataType: 'html', expectedDataValue: '
  1. one@
  2. two
  3. three
  4. four
' } ); + }, + + 'test drop after range end in readOnlyMode': function( editor, bot ) { + var evt = bender.tools.mockDropEvent(); + + bot.setHtmlWithSelection( '

^foo

' ); + editor.setReadOnly( true ); + + drag( editor, evt ); + drop( editor, evt, { + dropContainer: editor.editable().getParent(), + dropOffset: 0, + expectedPasteEventCount: 0, + expectedDropPrevented: true + }, function() { + return true; + }, function() { + editor.setReadOnly( false ); + assert.areSame( '

foo

', editor.getData(), 'after drop' ); + } ); } }, testsForOneEditor = { diff --git a/tests/tickets/gh808/manual/1.html b/tests/plugins/clipboard/manual/gh808.html similarity index 100% rename from tests/tickets/gh808/manual/1.html rename to tests/plugins/clipboard/manual/gh808.html diff --git a/tests/tickets/gh808/manual/1.md b/tests/plugins/clipboard/manual/gh808.md similarity index 91% rename from tests/tickets/gh808/manual/1.md rename to tests/plugins/clipboard/manual/gh808.md index e76e038bb2c..8b5cdf7e5b0 100644 --- a/tests/tickets/gh808/manual/1.md +++ b/tests/plugins/clipboard/manual/gh808.md @@ -1,4 +1,4 @@ -@bender-tags: 4.7.3, bug, 808 +@bender-tags: 4.8.0, bug, 808 @bender-ui: collapsed @bender-ckeditor-plugins: wysiwygarea, widget, clipboard, image2 From 17057f16a8116e932f9407ba101ffde1759f6600 Mon Sep 17 00:00:00 2001 From: Tomasz Jakut Date: Tue, 12 Dec 2017 16:47:49 +0100 Subject: [PATCH 03/21] Rename manual test. --- tests/plugins/clipboard/manual/{gh808.html => dropreadonly.html} | 0 tests/plugins/clipboard/manual/{gh808.md => dropreadonly.md} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename tests/plugins/clipboard/manual/{gh808.html => dropreadonly.html} (100%) rename tests/plugins/clipboard/manual/{gh808.md => dropreadonly.md} (100%) diff --git a/tests/plugins/clipboard/manual/gh808.html b/tests/plugins/clipboard/manual/dropreadonly.html similarity index 100% rename from tests/plugins/clipboard/manual/gh808.html rename to tests/plugins/clipboard/manual/dropreadonly.html diff --git a/tests/plugins/clipboard/manual/gh808.md b/tests/plugins/clipboard/manual/dropreadonly.md similarity index 100% rename from tests/plugins/clipboard/manual/gh808.md rename to tests/plugins/clipboard/manual/dropreadonly.md From 3a54a0800023097cb606a20265f98b031ba2a7c7 Mon Sep 17 00:00:00 2001 From: Tomasz Jakut Date: Tue, 12 Dec 2017 16:48:43 +0100 Subject: [PATCH 04/21] Update comment in code. --- plugins/clipboard/plugin.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/clipboard/plugin.js b/plugins/clipboard/plugin.js index 010d7a88dce..995994b956a 100644 --- a/plugins/clipboard/plugin.js +++ b/plugins/clipboard/plugin.js @@ -1508,8 +1508,7 @@ // Cancel native drop. evt.data.preventDefault(); - // #808 - // We shouldn't start drop action when editor is in read only mode + // We shouldn't start drop action when editor is in read only mode (#808). if ( editor.readOnly ) { return; } From 4f5dc98e7f7609f4366d5c09dd8182e96f677130 Mon Sep 17 00:00:00 2001 From: Kajetan Litwinowicz Date: Thu, 14 Feb 2019 15:57:27 +0100 Subject: [PATCH 05/21] Hide draghandler in readonly. --- plugins/widget/plugin.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/plugins/widget/plugin.js b/plugins/widget/plugin.js index 61cdfb3b706..26c9e0b4398 100644 --- a/plugins/widget/plugin.js +++ b/plugins/widget/plugin.js @@ -49,11 +49,7 @@ 'position:absolute;' + 'width:' + DRAG_HANDLER_SIZE + 'px;' + 'height:0;' + - // Initially drag handler should not be visible, until its position will be - // calculated (https://dev.ckeditor.com/ticket/11177). - // We need to hide unpositined handlers, so they don't extend - // widget's outline far to the left (https://dev.ckeditor.com/ticket/12024). - 'display:none;' + + 'display:block;' + 'opacity:0.75;' + 'transition:height 0s 0.2s;' + // Delay hiding drag handler. // Prevent drag handler from being misplaced (https://dev.ckeditor.com/ticket/11198). @@ -66,6 +62,16 @@ '.cke_widget_drag_handler_container:hover{' + 'opacity:1' + '}' + + '.cke_widget_drag_handler_container_hidden{' + + // Initially drag handler should not be visible, until its position will be + // calculated (https://dev.ckeditor.com/ticket/11177). + // We need to hide unpositined handlers, so they don't extend + // widget's outline far to the left (https://dev.ckeditor.com/ticket/12024). + 'display:none;' + + '}' + + '.cke_editable[contenteditable="false"] .cke_widget_drag_handler_container{' + + 'display:none;' + + '}' + 'img.cke_widget_drag_handler{' + 'cursor:move;' + 'width:' + DRAG_HANDLER_SIZE + 'px;' + @@ -1534,9 +1540,9 @@ editor.fire( 'lockSnapshot' ); this.dragHandlerContainer.setStyles( { top: newPos.y + 'px', - left: newPos.x + 'px', - display: 'block' + left: newPos.x + 'px' } ); + this.dragHandlerContainer.removeClass( '.cke_widget_drag_handler_container_hidden' ); editor.fire( 'unlockSnapshot' ); !initialDirty && editor.resetDirty(); From 3e08da6dddff6b8cc278f0fdd6fee8135e382ad1 Mon Sep 17 00:00:00 2001 From: Kajetan Litwinowicz Date: Fri, 15 Feb 2019 10:38:51 +0100 Subject: [PATCH 06/21] Tests: renamed and moved to widget catalogue. --- .../dropreadonly.html => widget/manual/draghandlerreadonly.html} | 0 .../dropreadonly.md => widget/manual/draghandlerreadonly.md} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename tests/plugins/{clipboard/manual/dropreadonly.html => widget/manual/draghandlerreadonly.html} (100%) rename tests/plugins/{clipboard/manual/dropreadonly.md => widget/manual/draghandlerreadonly.md} (100%) diff --git a/tests/plugins/clipboard/manual/dropreadonly.html b/tests/plugins/widget/manual/draghandlerreadonly.html similarity index 100% rename from tests/plugins/clipboard/manual/dropreadonly.html rename to tests/plugins/widget/manual/draghandlerreadonly.html diff --git a/tests/plugins/clipboard/manual/dropreadonly.md b/tests/plugins/widget/manual/draghandlerreadonly.md similarity index 100% rename from tests/plugins/clipboard/manual/dropreadonly.md rename to tests/plugins/widget/manual/draghandlerreadonly.md From 1f6187611ba812c0689416749249d10277059b6c Mon Sep 17 00:00:00 2001 From: Kajetan Litwinowicz Date: Fri, 15 Feb 2019 10:40:38 +0100 Subject: [PATCH 07/21] Tests: updated version tag, simplified test steps. --- tests/plugins/widget/manual/draghandlerreadonly.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/plugins/widget/manual/draghandlerreadonly.md b/tests/plugins/widget/manual/draghandlerreadonly.md index 8b5cdf7e5b0..1b10f87f823 100644 --- a/tests/plugins/widget/manual/draghandlerreadonly.md +++ b/tests/plugins/widget/manual/draghandlerreadonly.md @@ -1,11 +1,11 @@ -@bender-tags: 4.8.0, bug, 808 +@bender-tags: 4.11.3, bug, 808 @bender-ui: collapsed @bender-ckeditor-plugins: wysiwygarea, widget, clipboard, image2 ----- +1. Mouse hover on widget. -1. Start dragging widget. -1. Try to drop it below the text, when copy cursor is shown (warning: it's not shown in every browser). -1. repeat those steps for the selected paragraph +## Expected +Drag handler doesn't appear. -**Expected result:** Nothing happens. +## Unexpected +Drag handler appears. From f7980c43b4e3a684a553050c7f4c2c8f3864be94 Mon Sep 17 00:00:00 2001 From: Kajetan Litwinowicz Date: Fri, 15 Feb 2019 10:41:06 +0100 Subject: [PATCH 08/21] Tests: ignore on mobiles. --- tests/plugins/widget/manual/draghandlerreadonly.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/plugins/widget/manual/draghandlerreadonly.html b/tests/plugins/widget/manual/draghandlerreadonly.html index 5dad71e90c5..13c29a52d54 100644 --- a/tests/plugins/widget/manual/draghandlerreadonly.html +++ b/tests/plugins/widget/manual/draghandlerreadonly.html @@ -4,6 +4,10 @@ From d412a56277bc611c0d72dc886ccc83cb7be61eb6 Mon Sep 17 00:00:00 2001 From: Kajetan Litwinowicz Date: Fri, 15 Feb 2019 10:54:49 +0100 Subject: [PATCH 11/21] Tests: added new scenario. --- .../widget/manual/draghandlerreadonly.md | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/tests/plugins/widget/manual/draghandlerreadonly.md b/tests/plugins/widget/manual/draghandlerreadonly.md index 1b10f87f823..1c5498eed49 100644 --- a/tests/plugins/widget/manual/draghandlerreadonly.md +++ b/tests/plugins/widget/manual/draghandlerreadonly.md @@ -2,10 +2,30 @@ @bender-ui: collapsed @bender-ckeditor-plugins: wysiwygarea, widget, clipboard, image2 +## Scenario 1: + +Mouse hover on widget. + +### Expected + +Drag handler appears. + +### Unexpected + +Drag handler doesn't appear. + +--- + +## Scenario 2: + +1. Make editor readonly with checkbox. + 1. Mouse hover on widget. -## Expected +### Expected + Drag handler doesn't appear. -## Unexpected +### Unexpected + Drag handler appears. From 68f7937e9f6d99adaa36a9f6c4c7fdf0159b8a43 Mon Sep 17 00:00:00 2001 From: Kajetan Litwinowicz Date: Fri, 15 Feb 2019 11:13:04 +0100 Subject: [PATCH 12/21] Tests: fixed for IE. --- .../widget/manual/draghandlerreadonly.html | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/tests/plugins/widget/manual/draghandlerreadonly.html b/tests/plugins/widget/manual/draghandlerreadonly.html index 6a58ecb2db1..8b656faa5c1 100644 --- a/tests/plugins/widget/manual/draghandlerreadonly.html +++ b/tests/plugins/widget/manual/draghandlerreadonly.html @@ -13,12 +13,26 @@ CKEDITOR.replace( 'editor', { on: { instanceReady: function() { - var readonlyCheckBox = CKEDITOR.document.findOne( '#readonly' ); + var readonlyCheckBox = CKEDITOR.document.findOne( '#readonly' ), + editor = this; - this.setReadOnly( readonlyCheckBox.$.checked ); - readonlyCheckBox.on( CKEDITOR.env.ie ? 'input' : 'change', function() { - this.setReadOnly( readonlyCheckBox.$.checked ); - }, this ); + setReadOnly(); + + if ( CKEDITOR.env.ie ) { + setInterval( function() { + setReadOnly(); + }, 150 ); + } else { + readonlyCheckBox.on( 'change', function() { + setReadOnly( readonlyCheckBox.$.checked ); + } ); + } + + function setReadOnly() { + if ( editor.readOnly !== readonlyCheckBox.$.checked ) { + editor.setReadOnly( readonlyCheckBox.$.checked ); + } + } } } } ); From 80a9fd11c646847c394e8bac4e5da51079b08f93 Mon Sep 17 00:00:00 2001 From: Kajetan Litwinowicz Date: Fri, 15 Feb 2019 11:31:24 +0100 Subject: [PATCH 13/21] Tests: fixed failing test on IE. --- tests/plugins/clipboard/drop.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/plugins/clipboard/drop.js b/tests/plugins/clipboard/drop.js index e7d15e3d30c..80011b7b87b 100644 --- a/tests/plugins/clipboard/drop.js +++ b/tests/plugins/clipboard/drop.js @@ -695,7 +695,7 @@ var testsForMultipleEditor = { drag( editor, evt ); drop( editor, evt, { - dropContainer: editor.editable().getParent(), + dropContainer: editor.editable(), dropOffset: 0, expectedPasteEventCount: 0, expectedDropPrevented: true From 3837484291820f2fc81154ce457c8bd35e78e186 Mon Sep 17 00:00:00 2001 From: Kajetan Litwinowicz Date: Fri, 15 Feb 2019 11:37:32 +0100 Subject: [PATCH 14/21] Tests: excluded Edge from IE if branch. --- tests/plugins/widget/manual/draghandlerreadonly.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/plugins/widget/manual/draghandlerreadonly.html b/tests/plugins/widget/manual/draghandlerreadonly.html index 8b656faa5c1..2be3f9d7d15 100644 --- a/tests/plugins/widget/manual/draghandlerreadonly.html +++ b/tests/plugins/widget/manual/draghandlerreadonly.html @@ -18,7 +18,7 @@ setReadOnly(); - if ( CKEDITOR.env.ie ) { + if ( CKEDITOR.env.ie && !CKEDITOR.env.edge ) { setInterval( function() { setReadOnly(); }, 150 ); From 9dff83cf0b1683ebc7d0292b4a46f27db832c959 Mon Sep 17 00:00:00 2001 From: Kajetan Litwinowicz Date: Fri, 15 Feb 2019 11:41:29 +0100 Subject: [PATCH 15/21] Changelog: added new entry. --- CHANGES.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index b68a578e1ee..0d5c438384f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,10 @@ ## CKEditor 4.13 +Fixed Issues: + +* [#808](https://github.com/ckeditor/ckeditor-dev/issues/808): Fixed: [Widget](https://ckeditor.com/cke4/addon/widget) disappears on drag and drop in [Read-Only Mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html). + ## CKEditor 4.12.1 Fixed Issues: From f664c7a173815cc71bdb664fd4b4a89a245d8e27 Mon Sep 17 00:00:00 2001 From: Kajetan Litwinowicz Date: Fri, 15 Feb 2019 12:27:44 +0100 Subject: [PATCH 16/21] Tests: Added ticket number reference. --- tests/plugins/clipboard/drop.js | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/plugins/clipboard/drop.js b/tests/plugins/clipboard/drop.js index 80011b7b87b..a21b579e39a 100644 --- a/tests/plugins/clipboard/drop.js +++ b/tests/plugins/clipboard/drop.js @@ -686,6 +686,7 @@ var testsForMultipleEditor = { } ); }, + // (#808) 'test drop after range end in readOnlyMode': function( editor, bot ) { var evt = bender.tools.mockDropEvent(); From 51b6df49791f415a3299b8421f4a7c13e254f842 Mon Sep 17 00:00:00 2001 From: Kajetan Litwinowicz Date: Mon, 18 Feb 2019 11:48:28 +0100 Subject: [PATCH 17/21] Inlined style. --- plugins/widget/plugin.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/plugins/widget/plugin.js b/plugins/widget/plugin.js index 26c9e0b4398..208d323aae9 100644 --- a/plugins/widget/plugin.js +++ b/plugins/widget/plugin.js @@ -62,13 +62,6 @@ '.cke_widget_drag_handler_container:hover{' + 'opacity:1' + '}' + - '.cke_widget_drag_handler_container_hidden{' + - // Initially drag handler should not be visible, until its position will be - // calculated (https://dev.ckeditor.com/ticket/11177). - // We need to hide unpositined handlers, so they don't extend - // widget's outline far to the left (https://dev.ckeditor.com/ticket/12024). - 'display:none;' + - '}' + '.cke_editable[contenteditable="false"] .cke_widget_drag_handler_container{' + 'display:none;' + '}' + @@ -1542,7 +1535,8 @@ top: newPos.y + 'px', left: newPos.x + 'px' } ); - this.dragHandlerContainer.removeClass( '.cke_widget_drag_handler_container_hidden' ); + this.dragHandlerContainer.removeStyle( 'display' ); + editor.fire( 'unlockSnapshot' ); !initialDirty && editor.resetDirty(); @@ -3352,7 +3346,12 @@ container.setAttributes( { 'class': 'cke_reset cke_widget_drag_handler_container', // Split background and background-image for IE8 which will break on rgba(). - style: 'background:rgba(220,220,220,0.5);background-image:url(' + editor.plugins.widget.path + 'images/handle.png)' + // Initially drag handler should not be visible, until its position will be + // calculated (https://dev.ckeditor.com/ticket/11177). + // We need to hide unpositined handlers, so they don't extend + // widget's outline far to the left (https://dev.ckeditor.com/ticket/12024). + style: 'background:rgba(220,220,220,0.5);background-image:url(' + editor.plugins.widget.path + 'images/handle.png);' + + 'display:none;' } ); img = new CKEDITOR.dom.element( 'img', editor.document ); From a2f088b824268f7788ccf52d21df16d4fe6ae4db Mon Sep 17 00:00:00 2001 From: Kajetan Litwinowicz Date: Mon, 18 Feb 2019 11:49:47 +0100 Subject: [PATCH 18/21] Added comment with short explanation and ticket reference. --- plugins/widget/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/widget/plugin.js b/plugins/widget/plugin.js index 208d323aae9..5ea8ae68560 100644 --- a/plugins/widget/plugin.js +++ b/plugins/widget/plugin.js @@ -62,7 +62,7 @@ '.cke_widget_drag_handler_container:hover{' + 'opacity:1' + '}' + - '.cke_editable[contenteditable="false"] .cke_widget_drag_handler_container{' + + '.cke_editable[contenteditable="false"] .cke_widget_drag_handler_container{' + // Hide drag handler in read only mode (#808). 'display:none;' + '}' + 'img.cke_widget_drag_handler{' + From 930172381ecb5222f1104f292517f16353256607 Mon Sep 17 00:00:00 2001 From: Tomasz Jakut Date: Wed, 10 Jul 2019 13:45:34 +0200 Subject: [PATCH 19/21] Update tags in manual test. --- tests/plugins/widget/manual/draghandlerreadonly.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/plugins/widget/manual/draghandlerreadonly.md b/tests/plugins/widget/manual/draghandlerreadonly.md index 1c5498eed49..e251d174c9c 100644 --- a/tests/plugins/widget/manual/draghandlerreadonly.md +++ b/tests/plugins/widget/manual/draghandlerreadonly.md @@ -1,4 +1,4 @@ -@bender-tags: 4.11.3, bug, 808 +@bender-tags: 4.13.0, bug, 3260 @bender-ui: collapsed @bender-ckeditor-plugins: wysiwygarea, widget, clipboard, image2 From b7a8b438ce78a65f80b9e88cbf4aa77c9fe36367 Mon Sep 17 00:00:00 2001 From: Tomasz Jakut Date: Wed, 10 Jul 2019 13:48:18 +0200 Subject: [PATCH 20/21] Update changelog. --- CHANGES.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 0d5c438384f..814668e72d2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,7 +5,8 @@ Fixed Issues: -* [#808](https://github.com/ckeditor/ckeditor-dev/issues/808): Fixed: [Widget](https://ckeditor.com/cke4/addon/widget) disappears on drag and drop in [Read-Only Mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html). +* [#808](https://github.com/ckeditor/ckeditor-dev/issues/808): Fixed: [Widget](https://ckeditor.com/cke4/addon/widget) and other content disappear on drag and drop in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html). +* [#3260](https://github.com/ckeditor/ckeditor-dev/issues/3260): Fixed: [Widget](https://ckeditor.com/cke4/addon/widget) drag handler is visible in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html). ## CKEditor 4.12.1 From 98db913d20a939943d37cd5278b57e03cf380aab Mon Sep 17 00:00:00 2001 From: Tomasz Jakut Date: Wed, 10 Jul 2019 14:01:23 +0200 Subject: [PATCH 21/21] Update incorrect ticket reference. --- plugins/widget/plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/widget/plugin.js b/plugins/widget/plugin.js index 5ea8ae68560..cb3c589cc43 100644 --- a/plugins/widget/plugin.js +++ b/plugins/widget/plugin.js @@ -62,7 +62,7 @@ '.cke_widget_drag_handler_container:hover{' + 'opacity:1' + '}' + - '.cke_editable[contenteditable="false"] .cke_widget_drag_handler_container{' + // Hide drag handler in read only mode (#808). + '.cke_editable[contenteditable="false"] .cke_widget_drag_handler_container{' + // Hide drag handler in read only mode (#3260). 'display:none;' + '}' + 'img.cke_widget_drag_handler{' +