mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 06:15:48 +01:00
Fixed toolbar not showing up in firefox.
This commit is contained in:
@@ -173,6 +173,16 @@ export default class MermaidEditing extends Plugin {
|
|||||||
|
|
||||||
domElement.addEventListener( 'input', debouncedListener );
|
domElement.addEventListener( 'input', debouncedListener );
|
||||||
|
|
||||||
|
domElement.addEventListener( 'focus', () => {
|
||||||
|
const model = editor.model;
|
||||||
|
const selectedElement = model.document.selection.getSelectedElement();
|
||||||
|
|
||||||
|
// Move the selection onto the mermaid widget if it's currently not selected.
|
||||||
|
if ( selectedElement !== data.item ) {
|
||||||
|
model.change( writer => writer.setSelection( data.item, 'on' ) );
|
||||||
|
}
|
||||||
|
}, true );
|
||||||
|
|
||||||
return domElement;
|
return domElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user