Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
marwinpl opened this issue Aug 28, 2024 · 0 comments
Open

Comments

@marwinpl
Copy link

marwinpl commented Aug 28, 2024

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant