diff --git a/packages/ckeditor5-link/src/linkui.js b/packages/ckeditor5-link/src/linkui.js index f1e13f4f042..49a2dc2c67a 100644 --- a/packages/ckeditor5-link/src/linkui.js +++ b/packages/ckeditor5-link/src/linkui.js @@ -154,7 +154,7 @@ export default class LinkUI extends Plugin { // Execute link command after clicking the "Save" button. this.listenTo( formView, 'submit', () => { - editor.execute( 'link', formView.urlInputView.fieldView.value, formView.getDecoratorSwitchesState() ); + editor.execute( 'link', formView.urlInputView.fieldView.element.value, formView.getDecoratorSwitchesState() ); this._closeFormView(); } ); @@ -307,7 +307,7 @@ export default class LinkUI extends Plugin { // clicked the same link), they would see the old value instead of the actual value of the command. // https://github.com/ckeditor/ckeditor5-link/issues/78 // https://github.com/ckeditor/ckeditor5-link/issues/123 - this.formView.urlInputView.fieldView.value = linkCommand.value || ''; + this.formView.urlInputView.fieldView.element.value = linkCommand.value || ''; } /** diff --git a/packages/ckeditor5-link/tests/linkui.js b/packages/ckeditor5-link/tests/linkui.js index 3129e4858fb..48c6b18f511 100644 --- a/packages/ckeditor5-link/tests/linkui.js +++ b/packages/ckeditor5-link/tests/linkui.js @@ -236,12 +236,12 @@ describe( 'LinkUI', () => { setModelData( editor.model, '<$text linkHref="url">f[]oo' ); // Mock some leftover value **in DOM**, e.g. after previous editing. - formView.urlInputView.fieldView.value = 'leftover'; + formView.urlInputView.fieldView.element.value = 'leftover'; linkUIFeature._showUI(); actionsView.fire( 'edit' ); - expect( formView.urlInputView.fieldView.value ).to.equal( 'url' ); + expect( formView.urlInputView.fieldView.element.value ).to.equal( 'url' ); } ); // https://github.com/ckeditor/ckeditor5-link/issues/123 @@ -249,7 +249,7 @@ describe( 'LinkUI', () => { setModelData( editor.model, 'f[]oo' ); linkUIFeature._showUI(); - expect( formView.urlInputView.fieldView.value ).to.equal( '' ); + expect( formView.urlInputView.fieldView.element.value ).to.equal( '' ); } ); it( 'should optionally force `main` stack to be visible', () => {