mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-27 23:41:31 +08:00
Fixed toolbar not showing up in firefox.
This commit is contained in:
parent
203ee28f70
commit
108e2f48f0
@ -173,6 +173,16 @@ export default class MermaidEditing extends Plugin {
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user