From 3629401035a4df247aa761443e8af34de0cba505 Mon Sep 17 00:00:00 2001 From: Sauli Anto Date: Sun, 18 Oct 2020 19:19:21 +0300 Subject: [PATCH] Fix math editing button for balloon editor --- src/mathui.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/mathui.js b/src/mathui.js index ed0527505..52d258c84 100644 --- a/src/mathui.js +++ b/src/mathui.js @@ -211,17 +211,15 @@ export default class MathUI extends Plugin { _enableUserBalloonInteractions() { const editor = this.editor; - if ( editor.constructor.name === 'BalloonEditor' ) { - const viewDocument = this.editor.editing.view.document; - this.listenTo( viewDocument, 'click', () => { - const mathCommand = editor.commands.get( 'math' ); - if ( mathCommand.value ) { - if ( mathCommand.isEnabled ) { - this._showUI(); - } + const viewDocument = this.editor.editing.view.document; + this.listenTo( viewDocument, 'click', () => { + const mathCommand = editor.commands.get( 'math' ); + if ( mathCommand.value ) { + if ( mathCommand.isEnabled ) { + this._showUI(); } - } ); - } + } + } ); // Close the panel on the Esc key press when the editable has focus and the balloon is visible. editor.keystrokes.set( 'Esc', ( data, cancel ) => {