From 359af47506244239d1b10de74d3c5098c582236d Mon Sep 17 00:00:00 2001 From: Aleksander Nowodzinski Date: Thu, 17 Jan 2019 13:41:35 +0100 Subject: [PATCH] Renamed .ck-widget_selectable to .ck-widget_with-selection-handler. --- src/utils.js | 2 +- tests/utils.js | 2 +- tests/widget.js | 32 ++++++++++++++++---------------- theme/widget.css | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/utils.js b/src/utils.js index 29354db6..75e9a6e7 100644 --- a/src/utils.js +++ b/src/utils.js @@ -321,5 +321,5 @@ function addSelectionHandler( editable, writer ) { // Append the selection handler into the widget wrapper. writer.insert( writer.createPositionAt( editable, 0 ), selectionHandler ); - writer.addClass( [ 'ck-widget_selectable' ], editable ); + writer.addClass( [ 'ck-widget_with-selection-handler' ], editable ); } diff --git a/tests/utils.js b/tests/utils.js index 5b0fd269..46dcb1ff 100644 --- a/tests/utils.js +++ b/tests/utils.js @@ -105,7 +105,7 @@ describe( 'widget utils', () => { it( 'should add element a selection handler to widget if hasSelectionHandler=true is passed', () => { toWidget( element, writer, { hasSelectionHandler: true } ); - expect( element.hasClass( 'ck-widget_selectable' ) ).to.be.true; + expect( element.hasClass( 'ck-widget_with-selection-handler' ) ).to.be.true; const selectionHandler = element.getChild( 0 ); expect( selectionHandler ).to.be.instanceof( UIElement ); diff --git a/tests/widget.js b/tests/widget.js index 6b79eeb1..e530224c 100644 --- a/tests/widget.js +++ b/tests/widget.js @@ -1236,11 +1236,11 @@ describe( 'Widget', () => { viewDocument.fire( 'mousedown', domEventDataMock ); expect( getViewData( view ) ).to.equal( - '[
' + - '
' + + '[
' + + '
' + '
' + '
' + - '
' + + '
' + '
' + '
' + '
' + @@ -1268,19 +1268,19 @@ describe( 'Widget', () => { viewDocument.fire( 'mousedown', domEventDataMock ); expect( getViewData( view ) ).to.equal( - '
' + + '
' + '
' + '
' + - '[
' + - '
' + + '[
' + + '
' + '
' + '
' + - '
' + + '
' + '
' + '
' + '
' + '
]' + - '
' + + '
' + '
' + '
' ); @@ -1304,9 +1304,9 @@ describe( 'Widget', () => { viewDocument.fire( 'mousedown', domEventDataMock ); expect( getViewData( view ) ).to.equal( - '[
' + + '[
' + '
foo bar
' + - '
' + + '
' + '
' + '
' + '
' + @@ -1334,12 +1334,12 @@ describe( 'Widget', () => { viewDocument.fire( 'mousedown', domEventDataMock ); expect( getViewData( view ) ).to.equal( - '
' + - '
' + + '
' + + '
' + '
' + '
' + - '[
' + - '
' + + '[
' + + '
' + '
' + '
' + '
' + @@ -1364,9 +1364,9 @@ describe( 'Widget', () => { viewDocument.fire( 'mousedown', domEventDataMock ); expect( getViewData( view ) ).to.equal( - '
' + + '
' + '
' + - '[
' + + '[
' + '
' + '
]' + '
' + diff --git a/theme/widget.css b/theme/widget.css index b8c63a71..9e88cb34 100644 --- a/theme/widget.css +++ b/theme/widget.css @@ -3,7 +3,7 @@ * For licensing, see LICENSE.md. */ -.ck .ck-widget.ck-widget_selectable { +.ck .ck-widget.ck-widget_with-selection-handler { /* Make the widget wrapper a relative positioning container for the drag handler. */ position: relative;