@elasticias/ui 1.0.32 → 1.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5190,6 +5190,21 @@ class EfDataCardComponent {
|
|
|
5190
5190
|
* Children that own their own click. Opening the row on top of them would
|
|
5191
5191
|
* run two things from one gesture.
|
|
5192
5192
|
*/
|
|
5193
|
+
/**
|
|
5194
|
+
* Cells that exist for a control of their own rather than for the row's
|
|
5195
|
+
* content: the drag handle, the select box, the actions menu. The
|
|
5196
|
+
* component already treats `select` and `actions` as structural when it
|
|
5197
|
+
* decides what is a data column; a click belongs to the cell's own job.
|
|
5198
|
+
*
|
|
5199
|
+
* Guarding only the control itself was not enough. A select cell is wider
|
|
5200
|
+
* than its checkbox, so a click in the padding beside it fell through to
|
|
5201
|
+
* the row and opened the record — throwing away a multi-select that was
|
|
5202
|
+
* still being built, from a miss of about 20px.
|
|
5203
|
+
*/
|
|
5204
|
+
static STRUCTURAL_CELL = 'td.tbl-drag, td[data-col="select"], td[data-col="actions"]';
|
|
5205
|
+
isStructuralCell(target) {
|
|
5206
|
+
return !!target?.closest(EfDataCardComponent.STRUCTURAL_CELL);
|
|
5207
|
+
}
|
|
5193
5208
|
static INTERACTIVE_CHILD = 'button, a, input, select, textarea, label, [role="button"], [role="menu"], [role="menuitem"]';
|
|
5194
5209
|
/**
|
|
5195
5210
|
* Bounded by the row on purpose. The row itself is given `role="button"`
|
|
@@ -5228,6 +5243,8 @@ class EfDataCardComponent {
|
|
|
5228
5243
|
onRowClick(row, event) {
|
|
5229
5244
|
if (!this.rowDoubleClickable())
|
|
5230
5245
|
return;
|
|
5246
|
+
if (this.isStructuralCell(event.target))
|
|
5247
|
+
return;
|
|
5231
5248
|
if (this.isInteractiveTarget(event.target, event.currentTarget))
|
|
5232
5249
|
return;
|
|
5233
5250
|
if (this.hasTextSelection())
|