Skip to content

Commit

Permalink
Merge pull request #14424 from ckeditor/ck/14361-new-color-picker-sub…
Browse files Browse the repository at this point in the history
…mits-form

Fix (font): The accept button in the color picker will no longer submit forms . Closes #14361.
  • Loading branch information
illia-stv committed Jun 20, 2023
2 parents 74c507c + 196660e commit eff5cca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ckeditor5-font/src/ui/colortableview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ class ColorPickerPageView extends View {
class: 'ck-button-save',
withText: false,
label: t( 'Accept' ),
type: 'submit'
type: 'button'
} );

cancelButtonView.set( {
Expand Down
4 changes: 4 additions & 0 deletions packages/ckeditor5-font/tests/ui/colortableview.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,10 @@ describe( 'ColorTableView', () => {
expect( saveButton.element.classList.contains( 'ck-button-save' ) ).to.be.true;
} );

it( 'should have a proper type', () => {
expect( saveButton.type ).to.be.equal( 'button' );
} );

it( 'should have proper settings', () => {
expect( saveButton.withText ).to.be.false;
expect( saveButton.icon ).to.equal( icons.check );
Expand Down

0 comments on commit eff5cca

Please sign in to comment.