BUG: Modal won't open after closing it dynamically
Hello;
Thank you guys for the great tool, I just love the documentation, the easy to use/understand. I think I ran into an issue with the modal not opening again after closing it dynamically the first time. example:
editor.on('modal:open', () => this.openModalHandler(editor));
openModalHandler(editor){
const model = editor.getSelected();
const modal = editor.Modal;
const {type} = model.attributes;
modal.close();
switch (type) {
case 'image':
case 'section':
return this.addBackgroundImage(type);
}
}
I can't reproduce it on the official demo, eg.
editor.on('modal:open', () => {
console.log('Modal opened');
setTimeout(() => {
console.log('Close modal');
editor.Modal.close()
}, 2000)
});
But just checking your code I'd say it doesn't open because you're closing it immediately after (just after the open is triggered), am I missing something?!
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.