Ticket #6883 (confirmed Bug)
Table Dialog error when clicking OK button if multiple table cells are selected
| Reported by: | bshiver | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | General | Version: | 3.2.2 |
| Keywords: | Cc: | satya_minnekanti@… |
Description (last modified by fredck) (diff)
It is possible to get a "Uncaught TypeError: Cannot call method 'appendChild' of undefined" [Chrome] error ("k.$ is undefined" in Firefox) when clicking the OK button in the table dialog if the user selected multiple table cells before launching the table dialog. This bug affects all major browsers.
To reproduce:
- Click the table dialog toolbar button and press the "Ok" button to insert a new table.
- Select multiple cells in the new table by either clicking and dragging or Ctrl-clicking multiple cells.
- Press the table dialog toolbar button again.
- Press the "Ok" button in the table dialog.
Results:
If you check the console you will see the described error, and the Table Dialog will stay in open.
Change History
comment:1 Changed 2 years ago by Saare
- Status changed from new to confirmed
- Keywords Table Dialog removed
- Version changed from 3.5 to 3.2.2
comment:4 Changed 14 months ago by fredck
- Status changed from confirmed to closed
- Resolution set to worksforme
I'm not able to reproduce it any more with trunk.
comment:5 Changed 14 months ago by j.swiderski
- Status changed from closed to reopened
- Resolution worksforme deleted
This is still reproducible:
- Clear editor contents.
- Click the table dialog toolbar button and press the "Ok" button to insert a new table.
- Fill table cells with sample text like "dd"
- Select multiple cells in the new table by either clicking and dragging or Ctrl-clicking multiple cells.
- Press the table dialog toolbar button again.
- Press the "Ok" button in the table dialog.
Message: this.$ is undefined
Line: 201
URI: /trunk/_source/core/dom/element.js
comment:7 Changed 14 months ago by fredck
My fault, I was using the context menu to open Table Properties.
The same thing happens if you click the "Insert Horizontal Line" button at step 5 of the above tc.
It is related to the insertion of elements over a multi-cells selections.
The right approach would be shrinking the selection to the cell touched by the start of the selection before proceeding with the insertion.

Not a 3.5 bug though; IIRC there's a ticket for that already but I can't find it.