Skip to content

Unable to select cells using mouse, when row/columns were removed by mergeΒ #246

@marwinpl

Description

@marwinpl

When you merge cells, causing some columns or rows to be removed, the table retains the original colspan and rowspan settings. As a result, you cannot select cells using the mouse.

Steps to reproduce:

  1. Create default table 3x3
  2. Merge all cells in column 1
  3. Merge all cells in column 2
  4. Merge column 1 and 2
    // at this stage you should have table 2x3 (but first cell will have colspan=2)
  5. Merge 2nd and 3rd cell in last column.
    // at this stage first cell have rowspan=3 and colspan=2, when table in fact is 2x2.

When now you will try to select cells using mouse from bottom-right it will not work. Trying to select from top-left sometimes work partially, sometimes correct depend on the mouse movement. Selecting by keyboard works fine.

Example of table after merging I described in steps:
image

HTML structure before merge:

<table>
    <tr>
        <td></td>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
        <td></td>
    </tr>
</table>

And after merge:

<table>
    <tr>
        <td colspan="2" rowspan="3"></td>
    </tr>
    <tr>
        <td></td>
        <td rowspan="2"></td>
    </tr>
    <tr>

    </tr>
</table>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions