Closed S1owe closed 2 months ago
Do you want only one dropdown window for creating tables to exist on the page ?
Yes. I need one drop-down window. If you click on the create table button in the second editor, the first one should close. The same logic applies when clicking outside the table creation element
I solved this problem as follows, I placed the following fragment in the registerToolbarTable method
document.addEventListener('click', (e: MouseEvent) => {
const isClickOnBtn = e.composedPath().includes(button);
if (isClickOnBtn) return;
const tableEl = toolbar.container.querySelector('div.ql-table-select-container');
if (!tableEl.classList.contains('ql-hidden')) this.tableSelect.hide(tableEl);
});
Okay, I will handle this issue.
It would be nice to add click tracking over time outside the table display button. So that when you click outside the button (the drop-down window for creating a table), the drop-down window closes. Now to close the window, you either need to click on the button or create a table