This commit is contained in:
2026-02-09 00:34:31 +01:00
parent 3c48b25778
commit 94a1ac3f86
2 changed files with 22 additions and 1 deletions

View File

@@ -1 +1 @@
1.2.82 1.2.83

View File

@@ -254,6 +254,27 @@
} }
}); });
editor.on('component:click', (model, evt) => {
if (!model || !evt || !evt.target) return;
const target = evt.target.closest && evt.target.closest('td,th');
if (!target) return;
const tableEl = target.closest && target.closest('table');
if (!tableEl || tableEl.getAttribute('data-bridge-table') !== '1') return;
const id = target.getAttribute('id');
if (id && editor.getWrapper && editor.getWrapper().find) {
const found = editor.getWrapper().find(`#${id}`);
if (found && found[0]) {
editor.select(found[0]);
return;
}
}
if (model.get && model.get('tagName') === 'tr') {
const cells = model.components && model.components();
const firstCell = cells && cells.length ? cells.at(0) : null;
if (firstCell) editor.select(firstCell);
}
});
editor.on('component:dblclick', (model) => { editor.on('component:dblclick', (model) => {
if (isBridgeTableComponent(model)) { if (isBridgeTableComponent(model)) {
openTableModal(model); openTableModal(model);