diff --git a/packages/ckeditor5-ui/src/textarea/textareaview.ts b/packages/ckeditor5-ui/src/textarea/textareaview.ts index 392a0df4844..835ce0b8e71 100644 --- a/packages/ckeditor5-ui/src/textarea/textareaview.ts +++ b/packages/ckeditor5-ui/src/textarea/textareaview.ts @@ -48,7 +48,7 @@ export default class TextareaView extends InputBase { * Specifies the value of HTML attribute that indicates whether the user can resize the element. * * @observable - * @default 'both' + * @default 'none' */ declare public resize: 'both' | 'horizontal' | 'vertical' | 'none'; @@ -72,7 +72,7 @@ export default class TextareaView extends InputBase { this.set( 'minRows', 2 ); this.set( 'maxRows', 5 ); this.set( '_height', null ); - this.set( 'resize', 'both' ); + this.set( 'resize', 'none' ); this.on( 'change:minRows', this._validateMinMaxRows.bind( this ) ); this.on( 'change:maxRows', this._validateMinMaxRows.bind( this ) ); diff --git a/packages/ckeditor5-ui/tests/manual/textarea/textareaview.ts b/packages/ckeditor5-ui/tests/manual/textarea/textareaview.ts index 5cd958c90c9..31bcc4a602d 100644 --- a/packages/ckeditor5-ui/tests/manual/textarea/textareaview.ts +++ b/packages/ckeditor5-ui/tests/manual/textarea/textareaview.ts @@ -46,21 +46,13 @@ function createPlainTextareaWithVerticalResizeOnly() { addToPlayground( 'Default rows, manual v-resize only', textareaView ); } -function createPlainTextareaWithNoResize() { - const textareaView = new TextareaView(); - - textareaView.resize = 'none'; - - addToPlayground( 'Default rows, no manual resize', textareaView ); -} - -function createPlainTextareaWithFixedSizeAndNoResize() { +function createPlainTextareaWithFixedSizeAndResizeBoth() { const textareaView = new TextareaView(); textareaView.minRows = textareaView.maxRows = 3; - textareaView.resize = 'none'; + textareaView.resize = 'both'; - addToPlayground( '3 fixed rows, no manual resize', textareaView ); + addToPlayground( '3 fixed rows, resize: both', textareaView ); } function addToPlayground( name, view ) { @@ -110,5 +102,4 @@ createPlainTextareaWithMoreRows(); createPlainTextareaWithFixedRows(); createPlainTextareaWithSingleRow(); createPlainTextareaWithVerticalResizeOnly(); -createPlainTextareaWithNoResize(); -createPlainTextareaWithFixedSizeAndNoResize(); +createPlainTextareaWithFixedSizeAndResizeBoth(); diff --git a/packages/ckeditor5-ui/tests/textarea/textareaview.js b/packages/ckeditor5-ui/tests/textarea/textareaview.js index 0add83c064c..118eb1a3a47 100644 --- a/packages/ckeditor5-ui/tests/textarea/textareaview.js +++ b/packages/ckeditor5-ui/tests/textarea/textareaview.js @@ -40,7 +40,7 @@ describe( 'TextareaView', () => { } ); it( 'should have default resize attribute value', () => { - expect( view.element.style.resize ).to.equal( 'both' ); + expect( view.element.style.resize ).to.equal( 'none' ); } ); it( 'should warn if #minHeight is greater than #maxHeight', () => { @@ -201,7 +201,7 @@ describe( 'TextareaView', () => { describe( 'resize attribute', () => { it( 'should react on view#reisze', () => { - expect( view.element.style.resize ).to.equal( 'both' ); + expect( view.element.style.resize ).to.equal( 'none' ); view.resize = 'vertical';