diff --git a/src/imagestyle/imagestyleui.js b/src/imagestyle/imagestyleui.js index 16452788..7fbca80b 100644 --- a/src/imagestyle/imagestyleui.js +++ b/src/imagestyle/imagestyleui.js @@ -85,7 +85,8 @@ export default class ImageStyleUI extends Plugin { view.set( { label: style.title, icon: style.icon, - tooltip: true + tooltip: true, + isToggleable: true } ); view.bind( 'isEnabled' ).to( command, 'isEnabled' ); diff --git a/tests/imagestyle/imagestyleui.js b/tests/imagestyle/imagestyleui.js index 758bd192..e82b97fb 100644 --- a/tests/imagestyle/imagestyleui.js +++ b/tests/imagestyle/imagestyleui.js @@ -56,6 +56,7 @@ describe( 'ImageStyleUI', () => { expect( buttonView ).to.be.instanceOf( ButtonView ); expect( buttonView.label ).to.equal( style.title ); expect( buttonView.icon ).to.equal( style.icon ); + expect( buttonView.isToggleable ).to.be.true; command.isEnabled = true; expect( buttonView.isEnabled ).to.be.true;