mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-27 23:41:31 +08:00
Fix math editing button for balloon editor
This commit is contained in:
parent
81414a90f2
commit
3629401035
@ -211,17 +211,15 @@ export default class MathUI extends Plugin {
|
|||||||
|
|
||||||
_enableUserBalloonInteractions() {
|
_enableUserBalloonInteractions() {
|
||||||
const editor = this.editor;
|
const editor = this.editor;
|
||||||
if ( editor.constructor.name === 'BalloonEditor' ) {
|
const viewDocument = this.editor.editing.view.document;
|
||||||
const viewDocument = this.editor.editing.view.document;
|
this.listenTo( viewDocument, 'click', () => {
|
||||||
this.listenTo( viewDocument, 'click', () => {
|
const mathCommand = editor.commands.get( 'math' );
|
||||||
const mathCommand = editor.commands.get( 'math' );
|
if ( mathCommand.value ) {
|
||||||
if ( mathCommand.value ) {
|
if ( mathCommand.isEnabled ) {
|
||||||
if ( mathCommand.isEnabled ) {
|
this._showUI();
|
||||||
this._showUI();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} );
|
}
|
||||||
}
|
} );
|
||||||
|
|
||||||
// Close the panel on the Esc key press when the editable has focus and the balloon is visible.
|
// Close the panel on the Esc key press when the editable has focus and the balloon is visible.
|
||||||
editor.keystrokes.set( 'Esc', ( data, cancel ) => {
|
editor.keystrokes.set( 'Esc', ( data, cancel ) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user